What is the Different ?
#1

Thanks for the Information !
Reply
#2

ZCMD commands are just faster to create.
And ZCMD commands are also most used to learn the pawn (and because the guy learnt the pawn with ZCMD, he continues to use ZCMD)

But no differences about performances.
With ZCMD, your server will be as fast as if you use strcmp.
Reply
#3

It is, and ZCMD is fast indeed. But you should take into a count of using YCMD instead.
Reply
#4

Read a quote of Zeex:
Quote:
Originally Posted by Zeex
Посмотреть сообщение
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.
---

Quote:
Originally Posted by S4t3K
Посмотреть сообщение
But no differences about performances.
With ZCMD, your server will be as fast as if you use strcmp.
Not a valid argument, compare y_commands or ZCMD with strcmp and you'll see big difference for a server that uses many commands.
Reply
#5

Comparing strings are always slower.Because strings are arrays.
new string[10];
If you have to check a command then you will have to check string[0],string[1],....till [9].
That makes things slow.

If you go through the include, you will notice that ZCMD works very much differently.
When you use COMMAND:cmdname you are actually creating a function with a name cmd_cmdname.
So what ZCMD does is when it receives a command it joins "cmd_" and the command entered and calls the respective function.So there is no string checking or any such thing that would possibly make the server processing slow.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)