ZCMD And Strcmp
#1

Is ther any possability to Use Strcmp And ZCMD ,
becouse my Scipt is 100 procent Strcmp but ive found a new vehicle system wichs i wish to Have on my script but its ZCMD What happends if i Download ZCMD Inlcude and put it in my old strcmp commands will still work/? Reply pls.

example of strcmp

if(!strcmp(cmdtext, "/adminduty", true) || !strcmp(cmdtext, "/aduty", true)) // Original by LordMan, Modded 99%
Reply
#2

pawn Код:
//Change:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //...
}

//To:
forward OnPlayerCommandTextEx(playerid, cmdtext[]);
public OnPlayerCommandTextEx(playerid, cmdtext[])
{
    //...
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)//ZCMD's Callback
{
    if(!success) success = OnPlayerCommandTextEx(playerid,cmdtext);// << Add it.
    return success;
}
It is recommended that you update your strcmp to zcmd/ycmd.
Reply
#3

My gamemode has 100 k lines aint going to do that lol that will take years.

So with this i can have both?
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=276063
Reply
#5

Quote:
Originally Posted by kepa333
Посмотреть сообщение
So with this i can have both?
Theoretically yes, try it.
Reply
#6

yes you could use both. But It's recommend you update the most used commands to zcmd and preferably sscanf as well. So, if you have a RP script with a housing system, then try to use mostly zcmd for the commands in the housing system.

The only reason i say this, is because zcmd/ycmd are A LOT faster executed than strcmp and its just cleaner to work with.
Reply
#7

Well guys Ive started Working with Strcmp on my firsht script project and i do it for a long time , Ive no idea how i convert to ZCMD thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)