Quote:
|
Originally Posted by FreddoX [BINMAN
]
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/help", true) == 0) { SendClientMessage(playerid, COLOR_BLUE, "** HELP **"); SendClientMessage(playerid, COLOR_RED, "** COMMANDS **\n /suicide"); return 1; } if(strcmp(cmdtext, "/error", true) == 0) { SendClientMessage(playerid, COLOR_RED, "** ERROR **"); return 1; } }
Remember to return 1 (for commands) - though you should use an alternate command processor (such as zcmd), and use brackets to keep code in callbacks/functions etc.
|
Thanks, but I've got a warning now.
pawn Код:
C:\Documents and Settings\Skellyhand\Desktop\gtaserver\gamemodes\Untitled.pwn(146) : warning 209: function "OnPlayerCommandText" should return a value