07.01.2014, 10:21
Make sure it returns 1;
example using ZCMD (regular strcmp is the same)
if I remember correctly with strcmp command you need to do return 1; and return 0; at the last bracket aswell.
example from samp wiki:
example using ZCMD (regular strcmp is the same)
pawn Код:
CMD:example(playeris, params[])
{
SendClientMessage(playerid, -1, "This is a example");
return 1;//add this
}
example from samp wiki:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/me", true, 3))
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;//returning 1 for each command code
}
if(!strcmp(cmdtext, "/example", true, 3)) //our zcmd command in strcmp
{
SendClientMessage(playerid, -1, "This is a example");
return 1;//returning 1 for each command code
}
return 0;//returning 0 for the last bracket
}