21.02.2013, 23:55
I have made this command:
For some reason, it doesn't want to work at all, it doesn't call the public harvesting at all, any ideas?
pawn Код:
if(!strcmp(option, "harvest", true))
{
if(HarvestingPlant[playerid] == 0)
{
if(GetPlayerWeapon(playerid) != 4) return SendClientNotice(playerid, "Notice", "You need to have a~n~knife in order to harvest~n~marijuana plants.");
for(new i = 0; i<MAX_WEED; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, Weed[i][wx], Weed[i][wy], Weed[i][wz]))
{
if(Weed[i][wState] == 2)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, Weed[i][wx], Weed[i][wy], Weed[i][wz]))
Weed[i][wTimer] = SetTimerEx("Harvest", 1000, false, "d", playerid);
SendClientMessage(playerid, COLOR_WHITE, "> You are harvesting the plant.");
HarvestingPlant[playerid] = 1;
break;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "> You are already harvesting this plant.");
}
}
For some reason, it doesn't want to work at all, it doesn't call the public harvesting at all, any ideas?