Converting strcmp to ZCMD?
#1

Well,guys i had to leave scripting for sometime,cause of my studies.Now i am back,and I see that many goodies have been realised,such ZCMD.Unfortunently,i dont have the scripting knowledge that i had in the past..and I got an 72.000 gamemode,scripted by me in strcmp.Just because its awuful,and it takes an hour compiling it,I decided scripting the gamemode again but with ZCMD instead of strcmp..Its gonna take hours but,can you please explain me how?
Reply
#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
#3

I suggest you to use YCMD, not ZCMD
Reply
#4

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
I suggest you to use YCMD, not ZCMD
I find ZCMD is the best.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)