What command system should I use.
#1

Hello!
I have up to 600 commands in my gamemode and I need to rewrite them to the fast and flexible command system. Currently I am using strcmp method, which is slow (that is what I heard).

The problem is that the command system must provide:

- possibility to change command name at runtime
- possibility to make proxy commands at runtime - which point to the same block of code (like /healme -> /heal)
- possibility to group commands and players (admins, mods, special users etc.)
- possibility to set up privileges for groups (something like normal users can't use admin commands)
- easy way to list all commands and commands for particular groups

I don't know if there is such a library that can provide me these features. I have almost all of them using just strcmp.
Reply
#2

I doubt there is a way to change a command name at the run time unless you set it as filterscript. Anyhow I think that zCMD is the perfect command system.
Reply
#3

zcmd is the most promising commands proccesor
Reply
#4

ZCMD, I guess.
Reply
#5

6,000 commands...?

Remind me to NEVER play on your server, please! That's utterly ridiculous.

Anyways, you should look at y_commands (by ******). It's the fastest command system and it includes inbuilt features for the things you want.
Reply
#6

strcmp is just a pain in the ass to script, it does however work fine. In the future, you should use zcmd, to convert strcmp commands into something zcmd can read, replace
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
with
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
Reply
#7

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
strcmp is just a pain in the ass to script, it does however work fine. In the future, you should use zcmd, to convert strcmp commands into something zcmd can read, replace
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
with
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
No, no, no, no, no, no, no!!!

You've not done a damn thing there. That's just being lazy! The whole point of ZCMD/y_commands is to AVOID using strcmp in commands! You're supposed to use sscanf, or other similar libraries. Adding strcmp still bogs down your speed and basically defeats the purpose of even switching your command processor.
Reply
#8

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
No, no, no, no, no, no, no!!!

You've not done a damn thing there. That's just being lazy! The whole point of ZCMD/y_commands is to AVOID using strcmp in commands! You're supposed to use sscanf, or other similar libraries. Adding strcmp still bogs down your speed and basically defeats the purpose of even switching your command processor.
He either has to do that, or re write all his commands, which would take countless hours.
Reply
#9

6000 commands, which should be able to be renamed during runtime?
That's ridiculous.
How can you even remember them all, including their syntax? Or list them properly?

Can't you combine some commands into one?
Like "/engineon" and "/engineoff" could become "/engine".

Why would you need the ability to change command-names during runtime anyway?
It would only confuse all your players when commands suddenly change without their knowledge.
Reply
#10

Definitely YCMD. It's fast, and it's easy to use.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)