[Include] rCmd.inc - Easiest way to create commands!

I have a question:
With zcmd you could return a command (cmd:lala(playerid, params[]) { return cmd_bliea(playerid, params); }

Can you do that with rCmd ?
Reply

What is the capital i, if I may ask? And why do I have to enter an amount of length?
Reply

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
That's a feature of sscanf. It's used to use optional parameters. So, for example "I(500)", when your command text doesn't include a value, it will automatically use the value given between the brackets.
Ooh that's nice! Thanks!
Reply

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
I know it's not a good way, but I'll make a macro to make it easier, check the topic sometimes, I'll do it soon.
Thank you for your answer and I surely will do that!
Reply

So rCmd now supports optional parameters as well? That's just awesome!
Reply

Just wondering, is anyone using this include? I'd like to hear some feedback and suggestions as I'm working on an update. In this update, I mainly focus on not including DynamicParams and make sure you can create commands without the "&" in front of your non-array variable.
Reply

I'am Personally Using This from Many months Its just Awesome
I love it. its fast Simple and Flexible!!
Would love to see it updated
Reply

how about speed test and comare to zcmd/y_commands ?
Reply

Why does that matter to everyone in command systems? It's not that your server is going to freeze if you execute a simple command (unless you add very heavy code under the command). If you're really curious, yes, this is slower than zcmd and y_commands (not significantly slow). See the results here:
Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
I have some benchmarks:
pawn Код:
[Benchmark] 'signle_int_zcmd' executed about 164.09 times/ms.
[Benchmark] 'signle_int_rcmd' executed about 109.70 times/ms.

[Benchmark] 'signle_string_zcmd' executed about 150.49 times/ms.
[Benchmark] 'signle_string_rcmd' executed about 72.40 times/ms.

[Benchmark] 'no_params_zcmd' executed about 187.40 times/ms.  
[Benchmark] 'no_params_rcmd' executed about 136.98 times/ms.

[Benchmark] 'mixed_params_zcmd_sscanf' executed about 86.96 times/ms.
[Benchmark] 'mixed_params_rcmd' executed about 49.35 times/ms.
In most cases it's ~2 times slower than zcmd. It's actually still pretty fast! I will see in future versions if I'll be able to increase performance. But again, those results are nothing you should really worry about.
Reply

After entering the second (in a row) team, no matter what specifically, the main thing that it was the current command, not "SERVER: Unknow Command" - the server will crash.

I read the whole thread, and took into account all that is said - none of this has helped.
Reply

Could you please share what crashdetect debugs?
Reply

Good Job i really like it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)