20.03.2015, 17:25
after players harvest the drugs they should get 50 grams of drugs, but instead of players that actually harvested it, only player id 0 is getting drugs.
this is the command
if(strcmp(cmd, "/harvest1", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10,-1073.7500,-1095.6509,129.218 && PlayerInfo[playerid][pJob] == 4 && plant1 == 1 && PlayerInfo[playerid][pHarvest] == 1)
{
plant1 = 0;
DestroyDynamicObject(bigplant1);
PlayerInfo[playerid][pHarvest] = 0;
PlayerInfo[giveplayerid][pDrugs] += 50;
SCM(playerid, COLOR_WHITE, "+ 50 drugs!");
}
else
{
SCM(playerid, COLOR_WHITE, "Error!");
}
return 1;
}
this is the command
if(strcmp(cmd, "/harvest1", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10,-1073.7500,-1095.6509,129.218 && PlayerInfo[playerid][pJob] == 4 && plant1 == 1 && PlayerInfo[playerid][pHarvest] == 1)
{
plant1 = 0;
DestroyDynamicObject(bigplant1);
PlayerInfo[playerid][pHarvest] = 0;
PlayerInfo[giveplayerid][pDrugs] += 50;
SCM(playerid, COLOR_WHITE, "+ 50 drugs!");
}
else
{
SCM(playerid, COLOR_WHITE, "Error!");
}
return 1;
}