28.07.2012, 12:47
Hi, I got a problem with a command.
What it's doing is looping trough planted weeds and checking if I'm close enough to them. It should say "You are not near any fully grown weed plant!" if I am not near it, but instead it just says unknown command.
What it's doing is looping trough planted weeds and checking if I'm close enough to them. It should say "You are not near any fully grown weed plant!" if I am not near it, but instead it just says unknown command.
pawn Код:
CMD:checkweed(playerid, params[])
{
new success = 0;
for(new i = 0; i <= MAX_WEEDS; i++) {
if(IsPlayerInRangeOfPoint(playerid, 2.5, weedVariables[i][wPos][0], weedVariables[i][wPos][1], weedVariables[i][wPos][2])) {
success = 1;
break;
}
}
if(success == 0)
return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not near any fully grown weed plant!");
return 1;
}