Command Error
#3

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.
Reply


Messages In This Thread
Command Error - by keujh - 03.04.2010, 01:21
Re: Command Error - by dracar - 03.04.2010, 01:36
Re: Command Error - by Calgon - 03.04.2010, 01:38
Re: Command Error - by keujh - 03.04.2010, 02:03
Re: Command Error - by keujh - 03.04.2010, 02:05
Re: Command Error - by ScottCFR - 03.04.2010, 03:14
Re: Command Error - by keujh - 03.04.2010, 03:27

Forum Jump:


Users browsing this thread: 2 Guest(s)