19.07.2011, 00:37
zcmd or ycmd don't work the way that strtok and strcmp do in OnPlayerCommandText. The command is removed from 'params', so 'params' only contains what was typed after the command. Also, you need to do an isnull check, not an strlen check.
pawn Код:
CMD:signcheck(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, 0xFF0000AA, "{FFFFFF}Use: /signcheck [checknumber]");
new
iNumber = strval(params);
if(iNumber == CheckNumber[playerid]) {
SendClientMessage(playerid, 0x00FF00AA, "{FFFFFF}You received your money!");
GivePlayerMoney(playerid, -111);
}
else return SendClientMessage(playerid, 0xFF0000AA, "{FF3300}Wrong checknumber!");
return 1;
}