SA-MP Forums Archive
ZCMD, sscanf2 in strcmp - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ZCMD, sscanf2 in strcmp (/showthread.php?tid=495731)



ZCMD, sscanf2 in strcmp - JeanHooke - 18.02.2014

Hi, my gamemode is in 'strcmp' and i must put the command in 'OnPlayerCommandText'.
I want put in my gamemode #include sscanf2 & zcmd but if i put the commands in STRCMP don't work.
I must put new call back?
If yes, what call back i must put?


Re: ZCMD, sscanf2 in strcmp - Dignity - 18.02.2014

ZCMD commands can go anywhere but a callback. Place them outside callbacks for them to work.


Re: ZCMD, sscanf2 in strcmp - JeanHooke - 18.02.2014

Yes, this i know, but if i put new callbacks and #include <zcmd> & <sscanf2> strcmp don't work, i want that STRCMP(onplayercommandtext) & zcmd work together


Re: ZCMD, sscanf2 in strcmp - dominik523 - 18.02.2014

you don't use strcmp for checking what did the player write, you just put CMD:tag near any command and you are good to go. I would suggest you to check sscanf and zcmd tutorials.


Re: ZCMD, sscanf2 in strcmp - Konstantinos - 18.02.2014

Quote:
Originally Posted by JeanHooke
Посмотреть сообщение
Yes, this i know, but if i put new callbacks and #include <zcmd> & <sscanf2> strcmp don't work, i want that STRCMP(onplayercommandtext) & zcmd work together
Those two cannot work together because the one will give unknown command. Switch to ZCMD or y_commands and replace any strtok to sscanf.


Re: ZCMD, sscanf2 in strcmp - JeanHooke - 18.02.2014

And i must convert all strrok in sscanf? :O Are 50k lines gamemode з.з