Ezt az FS-t nem én írtam hanem Gabor..
Én csak módositottam. Gondoltam meg osztom veletek.
Parancsok:
/drogtelep
/felszed
/besziv
/drogelad
/drogmegvesz
#include < a_samp >
#include < zcmd >
#include < sscanf2 >
#include < streamer >
///////////////////////////Drog azonosítók//////////////////////////////////////
#define DROG_NINCS 0 // Ha már foglalt akkor lehet más szám is..
#define DROG_VAN 1
#define DROGY 2
#define DROGN 3
////////////////////////////////////***/////////////////////////////////////////
#define COLOR_PINK 0xFF66FFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x33AAFFFF
#define COLOR_GREEN 0x33AA33AA
//////////////////////////////////Checkpoint////////////////////////////////////
new DROGCP, DROGFEL;
////////////////////////////////////Drog/////////////////////////////////////////
public OnGameModeInit()// FilterScript esetén \' public OnFilterScriptInit()\'
{
print(\"****************************************\");
print(\"* *\");
print(\"* Drog System betöltve By.: Gabor... *\");
print(\"* Át alakitotta Lockett *\");
print(\"* *\");
print(\"****************************************\");
DROGCP = CreateDynamicCP(-1104.8046,-1617.5413,76.3672, 2, -1, -1, -1, 200);
DROGFEL = CreateDynamicCP(-1074.3137,-1625.3157,76.3672, 2, -1, -1, -1, 200);
/////////////////////////////////Drog Map///////////////////////////////////////
CreateObject(669, -1075.00195, -1618.90930, 62.40000, 0.00000, 0.00000, 90.00000);
CreateObject(3409, -1068.45557, -1626.38831, 75.33594, 356.85840, 0.00000, 3.14159);
CreateObject(3409, -1068.56604, -1631.14551, 75.33594, 356.85840, 0.00000, 3.14159);
CreateObject(3409, -1068.58411, -1621.77856, 75.33594, 356.85840, 0.00000, 3.14159);
CreateObject(3261, -1052.38281, -1622.97656, 75.35938, 356.85840, 0.00000, 3.14159);
CreateObject(3261, -1074.74756, -1625.72632, 75.35940, 0.00000, 0.00000, 0.00000);
CreateObject(3374, -1099.48889, -1621.09167, 76.83590, 0.00000, 0.00000, 0.00000);
CreateObject(3374, -1099.43372, -1625.27527, 76.83590, 0.00000, 0.00000, 0.00000);
CreateObject(14782, -1117.37634, -1615.31494, 76.37590, 0.00000, 0.00000, 0.00000);
CreateObject(2314, -1099.39075, -1614.79773, 75.38920, 0.00000, 0.00000, 0.00000);
CreateObject(2314, -1102.53235, -1614.79578, 75.38920, 0.00000, 0.00000, 0.00000);
CreateObject(1575, -1101.16760, -1614.65271, 75.88080, 0.00000, 0.00000, 0.00000);
CreateObject(1318, -1096.78503, -1615.35950, 76.24860, 0.00000, 0.00000, 0.00000);
CreateObject(1318, -1077.11206, -1624.51501, 76.24860, 0.00000, 0.00000, 0.00000);
CreateObject(3261, -1074.74756, -1628.72632, 75.35940, 0.00000, 0.00000, 0.00000);
CreateObject(3261, -1074.74756, -1631.74634, 75.35940, 0.00000, 0.00000, 0.00000);
CreateObject(3261, -1074.74756, -1634.74634, 75.35940, 0.00000, 0.00000, 0.00000);
CreateObject(3261, -1074.72986, -1622.68457, 75.35940, 0.00000, 0.00000, 0.00000);
CreateObject(2314, -1105.67224, -1614.79578, 75.38920, 0.00000, 0.00000, 0.00000);
CreateObject(669, -1073.88513, -1622.09583, 62.40000, 0.00000, 0.00000, 90.00000);
CreateObject(669, -1074.11243, -1623.08105, 62.40000, 0.00000, 0.00000, 90.00000);
CreateObject(669, -1074.27271, -1624.40735, 62.40000, 0.00000, 0.00000, 171.00000);
return 1;
}
public OnGameModeExit() // FilterScript esetén \' public OnFilterScriptExit()\'
{
print(\"****************************************\");
print(\"* *\");
print(\"*Drog System kikapcsolva By.: Gabor... *\");
print(\"* Át alakitotta Lockett *\");
print(\"* *\");
print(\"****************************************\");
return 1;
}
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, \"Drog\", DROG_NINCS);
SetPVarInt(playerid, \"Felszed\", DROGN);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SetPVarInt(playerid, \"Drog\", DROG_NINCS);
SetPVarInt(playerid, \"Felszed\", DROGN);
return 1;
}
#pragma tabsize 0
CMD:drogtelep(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1085.9890,-1630.2303,76.3672);
LinkVehicleToInterior(tmpcar, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else
{
SetPlayerPos(playerid, -1085.9890,-1630.2303,76.3672);
}
return 1;
}
CMD:felszed(playerid, params[])
{
if(GetPVarInt(playerid, \"Drog\") == DROG_NINCS)
{
if(IsPlayerInDynamicCP(playerid, DROGFEL))
{
SetPVarInt(playerid, \"Felszed\", DROGY);
SendClientMessage(playerid, COLOR_GREEN, \"[sERVER]Felszedted a Canabist! Menj a Következõ Checkpointhoz!\");
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nem Vagy a Felszedõ Checkpointban!\");
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Van már Canabisod!\");
return 1;
}
CMD:drogcsinal(playerid, params[])
{
if(GetPVarInt(playerid, \"Drog\") == DROG_NINCS)
{
if(GetPVarInt(playerid, \"Felszed\") == DROGY)
{
if(!IsPlayerInDynamicCP(playerid, DROGCP)) return SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nem Vagy a Checkpointba!\");
SetPVarInt(playerid, \"Drog\", DROG_VAN);
TogglePlayerControllable(playerid, 0);
SetTimerEx(\"drogcsin\",4000,0,\"i\",playerid);
SetTimerEx(\"drogido\",300000,0,\"i\",playerid);
SendClientMessage(playerid, COLOR_PINK, \"[sERVER]Drogot Készítesz.....\");
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nem Szedtél Fel Canabist!\");
}
else SendClientMessage(playerid, COLOR_PINK, \"[sERVER]Ne Legyél Drogfüggõ, Pár Perc Múlva Újra Csinálhatsz!\");
return 1;
}
CMD:besziv(playerid, params[])
{
if(GetPVarInt(playerid, \"Drog\") == DROG_VAN)
{
SetPlayerDrunkLevel(playerid, 50000);
SetPlayerWeather(playerid, 203);
SetPVarInt(playerid, \"Drog\", DROG_NINCS);
SetTimerEx(\"bead\",60000,0,\"i\",playerid);
SendClientMessage(playerid, COLOR_PINK, \"[sERVER]Most Aztán Szépen Reccsen Vagy! *.*\");
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nincs Drogod!\");
return 1;
}
CMD:drogelad(playerid, params[])
{
if(GetPVarInt(playerid, \"Drog\") == DROG_VAN)
{
new
string[128],
name[MAX_PLAYER_NAME],
name2[MAX_PLAYER_NAME],
PID;
if(sscanf(params, \"u\", PID)) return SendClientMessage(playerid, COLOR_BLUE, \"Használat: /drogelad <ID/Játékos név>\");
if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, \"[HIBA]Rossz ID/Név!\");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
GetPlayerName(PID, name2, MAX_PLAYER_NAME);
format(string, sizeof(string), \"%s[sERVER] Elakar adni neked drogot $50000-ért, ha megakarod venni, akkor /megvesz <ID>\", name);
SendClientMessage(PID, COLOR_GREEN, string);
format(string, sizeof(string), \"[sERVER] Elakarsz adni %s-nak/nek drogot!\", name2);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nincsen drogod!\");
return 1;
}
CMD:drogmegvesz(playerid, params[])
{
if(GetPVarInt(playerid, \"Drog\") == DROG_NINCS)
{
new
string[128],
name[MAX_PLAYER_NAME],
name2[MAX_PLAYER_NAME],
PID;
if(sscanf(params, \"u\", PID)) return SendClientMessage(playerid, COLOR_BLUE, \"Használat: /drogmegvesz <ID/Játékos név>\");
if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, \"[HIBA]Rossz ID/Név!\");
if(GetPVarInt(PID, \"Drog\") == DROG_NINCS) return SendClientMessage(playerid, COLOR_RED, \"[HIBA]Nincs drog az illetõnél!\");
SetPVarInt(playerid, \"Drog\", DROG_VAN);
SetPVarInt(PID, \"Drog\", DROG_NINCS);
GivePlayerMoney(playerid, -50000);
GivePlayerMoney(PID, 50000);
GetPlayerName(playerid,name, MAX_PLAYER_NAME);
format(string, sizeof(string), \"[sERVER]%s Megvette tõled a drogot!\", name);
SendClientMessage(PID, COLOR_GREEN, string);
GetPlayerName(PID, name2, MAX_PLAYER_NAME);
format(string, sizeof(string), \"[sERVER]%s-tõl/tól Megvetted a drogot!\", name2);
SendClientMessage(playerid, COLOR_GREEN, string);
}
else SendClientMessage(playerid, COLOR_RED, \"[HIBA]Van már drogot!\");
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == DROGCP) return SendClientMessage(playerid, COLOR_BLUE, \"[sERVER]Ha Drogot Szeretnél Csinálni, Akkor /drogcsinal!\");
if(checkpointid == DROGFEL) return SendClientMessage(playerid, COLOR_BLUE, \"[sERVER]Ha Felszeretnéd Szedni a Canabist, akkor /felszed \");
return 1;
}
////////////////// Drog timerekhez kapcsolódó eljárások/////////////////////////
forward bead(playerid);
public bead(playerid)
{
SetPlayerDrunkLevel(playerid, 0);
SetPlayerWeather(playerid, 2);
SendClientMessage(playerid, COLOR_GREEN, \"[sERVER]Már nem vagy beszívva, aztán óvatosan a füvezéssel!\");
return 1;
}
forward drogido(playerid);
public drogido(playerid)
{
SetPVarInt(playerid, \"Drog\", DROG_NINCS);
SendClientMessage(playerid, COLOR_GREEN, \"[sERVER]Ember, mostmár újra csinálhatsz drogot.\");
return 1;
}
forward drogcsin(playerid);
public drogcsin(playerid)
{
SetPVarInt(playerid, \"Drog\", DROG_VAN);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_GREEN, \"[sERVER]Csináltál Drogot! Ha eladni akarod, akkor /drogelad, ha elszívni, akkor /besziv!\");
return 1;
}
///////////////////////////////////////***//////////////////////////////////////
http://pastebin.com/Y5ZcXgux