04.09.2010, 17:32
If you want custom error messages when the command doesn't exist use this example:
Instead of returning 0 at OnplayerCommandText, use SendClientMessage and your own custom message.
Instead of returning 0 at OnplayerCommandText, use SendClientMessage and your own custom message.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/test", true))
{
// Do something here
return true;
}
return SendClientMessage(playerid, 0xFFFFFF, "CUSTOM: Unknown COMMAND");
}