ZCMD and DCMD
#1

what's the difference between dcmd and zcmd ?? and when we have to use each one ?
Reply
#2

ZCMD is recommended.

Quote:
Originally Posted by ZCMD's Thread
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.
DCMD is just a macro of the default method (using strcmp which means slower).
Reply
#3

DCMD is a type of making command and ZCMD is also, actually not much differents, just the style

dcmd_mycommand(playerid, params[]) using strcmp

CMD:mycommand(playerid, params[])

I'm using ZCMD
Reply
#4

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
DCMD is a type of making command and ZCMD is also, actually not much differents, just the style

dcmd_mycommand(playerid, params[]) using strcmp

CMD:mycommand(playerid, params[])

I'm using ZCMD
ZCMD is faster though, I saw a chart before that ****** posted; comparing the speed of DCMD/ZCMD/YCMD and ZCMD+YCMD are much faster.

The picture doesn't exist anymore but it was originally here:https://sampforum.blast.hk/showthread.php?tid=416104&page=2
Reply
#5

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
ZCMD is faster though, I saw a chart comparing the speed of DCMD/ZCMD/YCMD and ZCMD+YCMD are much faster.
Indeed they are and actually y_commands is faster than ZCMD (for over 100 commands and from what I've read, y_commands is going to be much faster in the next release of YSI Library).

EDIT: Here's the picture: /imageshack/img195/43/fourcommands.png
Reply
#6

Nice
Reply
#7

What do you mean by faster and fastest ?
Reply
#8

The average execution time. See the link Konstantinos posted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)