[QUESTION] About OnPlayerCommandText
#2

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;
}
pawn Код:
if (!isnumeric(tmp)) return SendClientMessage(playerid, -1, "USAGE: /heal [playerid]");
You really should use zcmd (or y_commands) and sscanf though, it makes creating commands much faster and easier.
Reply


Messages In This Thread
[QUESTION] About OnPlayerCommandText - by vakhtang - 29.08.2014, 16:08
Re: [QUESTION] About OnPlayerCommandText - by Stinged - 29.08.2014, 16:11
Re: [QUESTION] About OnPlayerCommandText - by vakhtang - 29.08.2014, 16:13
Re: [QUESTION] About OnPlayerCommandText - by vakhtang - 29.08.2014, 16:18

Forum Jump:


Users browsing this thread: 1 Guest(s)