SA-MP Forums Archive
Confusing :O - 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: Confusing :O (/showthread.php?tid=494432)



Confusing :O - MTiFa - 13.02.2014

Guys i just wanna know what is the difference between the normal cmd and the zcmd and those types? i think the normal cmd works fine, why using the other? please help i could learn zcmd if it was better


Re: Confusing :O - Vanter - 13.02.2014

Depending on coding, it's getting easier, and processing commands is faster.
and yes! ZCMD is better.


Re: Confusing :O - Beckett - 13.02.2014

This is just a little include that uses OnPlayerCommandText() to process players' commands. Each command has a separate function like in dcmd, but zcmd calls them directly via CallLocalFunction(). Such method is much faster than when you successively compare the text player entered to each command you have in your script (especially if he send a nonexistent cmd, you pass though all then) and its superiority over the old way is proportional to the number of commands. I did a speed test when I've just statrted thinking about this approach, you can find its results here.


Re: Confusing :O - MTiFa - 13.02.2014

Thanks all i will learn to use it ASAP