SA-MP Forums Archive
'SERVER:UNKNOWN COMMAND' using ZCMD. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 'SERVER:UNKNOWN COMMAND' using ZCMD. (/showthread.php?tid=241333)



IsNumeric on PAWNO? - maramizo - 17.03.2011

Well, yes I want to do something like if the command entered is invalid, it shows 'SERVER: UNKNOWN COMMAND'.
Only problem is, I'm using ZCMD.
Thanks!

EDIT:
Is there an IsNumeric on PAWNO?


Re: 'SERVER:UNKNOWN COMMAND' using ZCMD. - Wyu - 17.03.2011

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
    if (!success) {
        // invalid command entered, do something here
    }
}



Re: 'SERVER:UNKNOWN COMMAND' using ZCMD. - maramizo - 17.03.2011

Quote:
Originally Posted by Wyu
Посмотреть сообщение
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
    if (!success) {
        // invalid command entered, do something here
    }
}
Niiiiiiiiiice! Thanks!


Re: 'SERVER:UNKNOWN COMMAND' using ZCMD. - maramizo - 17.03.2011

BUMP.
EDITED main TOPIC.


Re: 'SERVER:UNKNOWN COMMAND' using ZCMD. - pawn_ - 17.03.2011

Yes, it can be found in utils.inc.

pawn Код:
IsNumeric(const string[])
{
    for (new i = 0, j = strlen(string); i < j; i++)
    {
        if (string[i] > '9' || string[i] < '0') return 0;
    }
    return 1;
}