SA-MP Forums Archive
What is better? - 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: What is better? (/showthread.php?tid=582839)



What is better? - DusanInfinity - 23.07.2015

Can you tell me, what is the name of this commands? Ex: if(strcmp(cmd, "/agivemats", true) == 0)

And what is faster, this commands or y_commands?
I need to optimize my script, i think this can optimize my script too much


AW: What is better? - Mencent - 23.07.2015

Hello!

I think this commands doesn't have a name, except OnPlayerCommandText.

To your second question:
I think y_commands are faster, but it doesn't have a big difference.


- Mencent


AW: What is better? - Nero_3D - 23.07.2015

Well if you use over 50 or better over 100 commands use zcmd, ycmd, ...
For small modes ~10 cmds like filterscripts, strcmp should be better


Re: What is better? - DusanInfinity - 24.07.2015

I have maybe 200-300 commands... In strcmp i have 150-200 and about 100 in Ycmd


AW: What is better? - Mencent - 24.07.2015

Then YCMD, OCMD, DCMD, ZCMD and so on, are better.
strcmp is too slowly for so much commands.


- Mencent


Re: What is better? - Stanford - 24.07.2015

I recommend converting all your commands to a specific command processor. You can give Yashas' improved version of ZCMD (originally by Zeex) a try / use normal ZCMD version (Zeex) / YCMD (Y_Less) / ECMD (Emmet_) / LifeCMD (a plugin), DCMD (old, but its fine), or even try making your own command processor and rely on it after taking benchmarks!

Overall, if you are confused you may use ZCMD as it's fine.


Re: What is better? - DusanInfinity - 25.07.2015

I will convert all commands from strcmp to YCMD! Thank you all!