POSSIBLE? - 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: POSSIBLE? (
/showthread.php?tid=199122)
POSSIBLE? -
NuggaN_ - 14.12.2010
Possible to use dcmd, zcmd and strmp all in one script? I mean, can I use all of them in one in my script. Somce cmds with zcmd, some with dcmd etc. There wont be any errors? Please tell me!
Re: POSSIBLE? -
jonnyboy - 14.12.2010
ye possible. becouse i have many dcmd "thanks to tessar" and other crap so i think so "im not sure tho"
Re: POSSIBLE? -
NuggaN_ - 14.12.2010
because I have some commands with strcmp, some with dcmd. Now I want to add some with zcmd. So if I have all 3, wont become errors? oO
Re: POSSIBLE? -
Mehtab - 14.12.2010
there will be no room for error
Re: POSSIBLE? -
NuggaN_ - 14.12.2010
Hey guys, doesnt work. The STRCMP Commands arent working. And Message comes,: Server unknown Command
Re: POSSIBLE? -
DRIFT_HUNTER - 14.12.2010
You can combine dcmd+strcmp but not with ZCMD
Why?
Well ZCMD do not call on player command text
Re: POSSIBLE? -
CrucixTM - 14.12.2010
ZCMD is a lot faster than both dcmd and strcmp. I suggest you just change them, it'll be worth it in the long run.
Re: POSSIBLE? -
Nero_3D - 14.12.2010
Quote:
Originally Posted by DRIFT_HUNTER
You can combine dcmd+strcmp but not with ZCMD
Why?
Well ZCMD do not call on player command text
|
zcmd supports the public OnPlayerCommandReceived which is exactly the same
just add under #include <zcmd>
pawn Код:
#undef OnPlayerCommandText
#define OnPlayerCommandText OnPlayerCommandReceived
and you could use OnPlayerCommandText like normal since the OnPlayerCommandText define would call zcmd_OnPlayerCommandText which gets never called...
Quote:
Originally Posted by CrucixTM
ZCMD is a lot faster than both dcmd and strcmp. I suggest you just change them, it'll be worth it in the long run.
|
Only true if you have more than ~5 commands

but zcmd needs a public declaration which adds a little bit to the file size
To the topic: Yes its possible but its easy to convert the commands to zcmd (I suggest that)
Re: POSSIBLE? -
XePloiT - 14.12.2010
include the zcmd..
and replace OnPlayerCommandText With
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
}
and in there it'll be just like OnPlayerCommandText