strcmp cmd in zcmd
#2

(if correct) You cannot use spaces within commands, you can use things like isnull to check if the params is null or use sscanf.

This is an example:

pawn Код:
CMD:tele(playerid, params[])
{
    if(sscanf(params, "i", teleid)) return SendClientMessage(playerid, -1, "Usage: /tele [id]");
    if(teleid == 1)
    {
        //If they typed /tele 1, do something here
    }
    return 1;
}
Using ZCMD and sscanf.
Reply


Messages In This Thread
strcmp cmd in zcmd - by P<3TS - 29.07.2012, 23:08
Re: strcmp cmd in zcmd - by Kindred - 29.07.2012, 23:21
Re: strcmp cmd in zcmd - by SA-MPDrifter - 29.07.2012, 23:23

Forum Jump:


Users browsing this thread: 1 Guest(s)