SERVER: Unknown Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SERVER: Unknown Command (
/showthread.php?tid=363673)
SERVER: Unknown Command -
Dodo9655 - 28.07.2012
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.
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;
}
Re: SERVER: Unknown Command -
Ld Est Ld - 28.07.2012
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;
return 1; //-Maybe?
}
}
if(success == 0)
return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not near any fully grown weed plant!");
return 1;
}