SA-MP Forums Archive
Command help[Not a command, command message] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command help[Not a command, command message] (/showthread.php?tid=139148)



Command help[Not a command, command message] - Steven82 - 04.04.2010

Код:
SERVER: Unknown command.
How to get rid of that so if a command wrong, it don't say that.


Re: Command help[Not a command, command message] - Last_Stand_Guardian - 04.04.2010

pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
{
    return 1; //You have return 0; here, replace it with return 1; (It's the last return value in that callback ^^)
}
=D


Re: Command help[Not a command, command message] - Steven82 - 04.04.2010

ok thanks.


Re: Command help[Not a command, command message] - Niixie - 04.04.2010

or

pawn Код:
OnPlayerCommandText(bla, bla, bla)
{
   if(strcmp( bla bla bla bla)) // if you use that?
   {
       return 1;
   }
   return SendClientMessage(playerid, 0xFF0000AA, "SERVER: No such command!");
}



Re: Command help[Not a command, command message] - Steven82 - 04.04.2010

Thanks guys.