Hey Com,
In meinem Drugsystem geht fast garnichts?
Bei mir funtioniert nicht das man im rangeOfPoint sein muss, dann das einpflanzen?
Hier mal der COde für die Meister
if(strcmp(cmd, "/plantdrugs", true) == 0)
{
if(PlayerInfo[playerid][pJob] == 4 || PlayerInfo[playerid][pAdmin] >= 1337)
{
if(PlayerInfo[playerid][pDrugseems] >= 1)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1129.8623,-1084.1854,129.2188) || PlayerInfo[playerid][pAdmin] >= 1337)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /plantdrugs [Anzahl]");
return 1;
}
new menge;
menge = strval(tmp);
if(CanEarn[playerid] == 0)
{
if(menge >= PlayerInfo[playerid][pDrugseems])
{
if(GetPlayerMoney(playerid) >= menge*25)
{
dplant = CreateObject(760,1129.8623,-1084.1854,129.2188,0.00000000,0.00000000,0.00000000);
SetTimerEx("PlantDrugs1",60000,0,"i",playerid);
PlayerInfo[playerid][pDrugplants] = 1;
Drugsgepflanzt[playerid] = menge;
new stringg[128];
format(stringg,sizeof(stringg),"Du hast %d Samen eingesäht nun hast du noch %d Samen in deiner Tasche!",menge,PlayerInfo[playerid][pDrugseems]);
PlayerInfo[playerid][pDrugseems] -= menge;
SendClientMessage(playerid,WHITE,stringg);
return 1;
}
}
}
}
return SendClientMessage(playerid,WHITE,"Du bist nicht an der Plantage!");
}
}
return SendClientMessage(playerid,WHITE,"Du bist kein Drogendealer!");
}
if(strcmp(cmd, "/earndrugs", true) == 0)
{
if(PlayerInfo[playerid][pJob] == 4 || PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerInRangeOfPoint(playerid,10.0,1129.8623,-1084.1854,129.2188) || PlayerInfo[playerid][pAdmin] >= 1337)
{
if(CanEarn[playerid] == 1)
{
new stringg[128];
format(stringg,sizeof(stringg),"Du hast deine %d gepflanzten Drogen geerentet!",Drugsgepflanzt[playerid]);
SendClientMessage(playerid,WHITE,stringg);
SendClientMessage(playerid,WHITE,"Lasse sie nun rösten!");
CanEarn[playerid] = 0;
PlayerInfo[playerid][pUnDrugs] = Drugsgepflanzt[playerid];
Drugsgepflanzt[playerid] = 0;
DestroyObject(dplant);
return 1;
}
}
return 1;
}
}
Mfg nico WIss