SA-MP Forums Archive
zcmd and strcmp in the same gamemode. - 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 and strcmp in the same gamemode. (/showthread.php?tid=163079)



zcmd and strcmp in the same gamemode. - RealLifeRP - 26.07.2010

Whenever I use zcmd in my gamemode, only the zcmd commands work. How can I make it so both commands work?


Re: zcmd and strcmp in the same gamemode. - Jonni8 - 26.07.2010

Why you want to use both?
zcmd is a lot better and faster.
If I were you i'd stay with zcmd


Re: zcmd and strcmp in the same gamemode. - Kar - 26.07.2010

you can use both. you need to put strcmp in oncommandrecieved (zcmd callback)

or just change the header from the strcmp stuff to zcmd and change params to cmdtext lol


Re: zcmd and strcmp in the same gamemode. - iggy1 - 26.07.2010

You can use strcmp with zcmd, strcmp just compares two strings. Its OnPlayerCommandText that wont, you could say zcmd overides OnPlayerCommandText (it doesn't but think of it that way).

You should delete OnPlayerCommandText if you are using zcmd.


Re: zcmd and strcmp in the same gamemode. - DRIFT_HUNTER - 26.07.2010

If you use ZCMD OnPlayerCommandText is not called

you can try replace
public OnPlayerCommandText(playerid,cmdtext[]) with
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
[NOTE]I did not trye'd these or anything i just think it will work

but i suggest convert your commands to zcmd cos its faster and use less memory