SA-MP Forums Archive
zcmd or sscanf disables cmds. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: zcmd or sscanf disables cmds. (/showthread.php?tid=270522)



zcmd or sscanf disables cmds. - Facepunch - 20.07.2011

Why when I do #include <zcmd>
#include <sscanf2>

are my if (strcmp("/cop",.... commands disabled?
Not just the /cop, but all the cmds made using strcmp..


Re: zcmd or sscanf disables cmds. - Grim_ - 20.07.2011

You cannot use both ZCMD and the OnPlayerCommandText callback together. You will need to convert all of your commands to ZCMD.


Re: zcmd or sscanf disables cmds. - Facepunch - 20.07.2011

..... oh man.. Is there a way to create a cmd with strcmp that affects others, like setplayerfaction, but using strcmp and it doesnt apply to me, but the ID I choose?


Re: zcmd or sscanf disables cmds. - Kush - 20.07.2011

Quote:

Not just the /cop, but all the cmds made using strcmp..

No...


Re: zcmd or sscanf disables cmds. - Grim_ - 20.07.2011

Quote:
Originally Posted by Kush
Посмотреть сообщение
No...
You are incorrect.

Yes, there is. However, the style is very outdated and enefficient. I highly recommend you move on to ZCMD. To help you with parameters inside of commands, look into sscanf (assuming there's more than one. Otherwise, the basic 'params' will suit your needs).


Re: zcmd or sscanf disables cmds. - Kush - 21.07.2011

Quote:
Originally Posted by Grim_
Посмотреть сообщение
You are incorrect.

Yes, there is. However, the style is very outdated and enefficient. I highly recommend you move on to ZCMD. To help you with parameters inside of commands, look into sscanf (assuming there's more than one. Otherwise, the basic 'params' will suit your needs).
Did you even think before responding? Read my post regarding the quote again. We know Zcmd and strcmp aren't compatible, and we know strcmp is outdated and 'inefficient'.