Converting strcmp to ZCMD?
#2

Its quite easy actually, here's a little example
pawn Код:
//with ZCMD
CMD:help(playerid, params[])
{
    SendClientMessage(playerid,COLOR_ORANGERED,"Hello");
    return 1;
}
//with strcmp
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,COLOR_ORANGERED,"Hello");   
        return 1;
    }
Now if the command you used have used params(E.G:/ban ID REASON), usualy in strcmp you use strtok, in ZCMD use sscanf, its a lot faster/easier too.
Reply


Messages In This Thread
Converting strcmp to ZCMD? - by geohareas - 23.01.2013, 14:21
Re: Converting strcmp to ZCMD? - by DaRk_RaiN - 23.01.2013, 14:26
Re: Converting strcmp to ZCMD? - by DiGiTaL_AnGeL - 23.01.2013, 14:31
AW: Re: Converting strcmp to ZCMD? - by Blackazur - 23.01.2013, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)