21.04.2013, 19:07
pawn Код:
#define Acmd_Char '@'
public OnPlayerText(playerid, text[])
{
if(text[0] == Acmd_Char)
{
CallLocalFunction("OnPlayerACommandText", "ds", playerid, text[1]);
return 0;
}
return 1;
}
pawn Код:
public OnPlayerACommandText(playerid, cmdtext[])
{
if(strcmp("help", cmdtext, true, 4) == 0)
{
SendClientMessage(playerid, -1, "This is the @help command. Ask the players for help.");
return 1;
}
return 0;
}