Strange thing.
#3

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;
}
Reply


Messages In This Thread
Strange thing. - by iGetty - 19.07.2011, 00:25
AW: Strange thing. - by Meta - 19.07.2011, 00:29
Re: Strange thing. - by Calgon - 19.07.2011, 00:37

Forum Jump:


Users browsing this thread: 1 Guest(s)