Posts: 191
Threads: 34
Joined: Apr 2012
Reputation:
0
Hey guys, I personally use strcmp at the moment and I found out that ninety percent here are using zcmd/dcmd/any other kind of cmd instead of strcmp.
And well, I heard that it's a bit faster in milliseconds, so I was wondering, does it really matter if I use zcmd or strcmp? Will the players actually feel the difference? If I'll have a huge mode built with strcmp with high amount of players online at the same time - will the server lag?
Posts: 1,018
Threads: 129
Joined: Apr 2011
Reputation:
0
How can I tell you,I think ZCMD will perform faster,but I don't know if server will lag for everyone,and in my point of view,if you use it togheter with sscanf,it's a lot easier than strcmp+DefaultCommand system,but it's your choice...
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
I am not sure, but I think zcmd works by calling a function for the command, if it exists, using funcidx, and if it doesn't exist it returns 0 or whatever, so it's practically instant, where as strcmp/dcmd (same thing, just a macro..) goes
Player types /help
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /blah EXIST? NO? CARRY ON
DOES COMMAND /help EXIST? YES, CALL dcmd_help()!
Posts: 191
Threads: 34
Joined: Apr 2012
Reputation:
0
But my question is, will it be that effective that the players will feel the difference? Or it's mainly a point of convenience?
Posts: 191
Threads: 34
Joined: Apr 2012
Reputation:
0
Would anyone answer me? Is zcmd make a script look more professional?
If you'll see a scripter using zcmd and one using strcmp, will the one using zcmd look more professional as in your point of view?
Posts: 292
Threads: 9
Joined: Oct 2011
Reputation:
0
Lets say you have a big mode with 1000 commands being handled by strcmp and you want to switch command processors.
What command processors will give YOU the speed YOU want?
What command processors will give YOU the features YOU want?
What command processors will be easier for YOU to convert to?
See where I'm going with this? It's up to you to decide whats best for you're mode.
And to me, It's not what you use that make you look professional, It's how you use it.
Posts: 725
Threads: 4
Joined: Nov 2010
Reputation:
0
If you're creating a huge gamemode which contains a lot of commands, even if you use strcmp, players won't actually feel it, but it will sure cause a bit of lag, where players can't feel. This is why zcmd and sscanf are the best combine, in order to get a huge gamemode with a lot of commands in it, with having no lag at all.