Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 16.06.2012
As I see this command system is getting more and more attention, I've planned to re-write this with many bug fixes (if there are), performance tweaks and new features and maybe integrate the DynamicParams.inc to the include itself so you just have to download one thing.
Beside this, I'm not sure what makes this incompatible for some people, but I will try figure out soon.
Re: rCmd.inc - Easiest way to create commands! -
Kiwar_El - 16.06.2012
Thank you very much , Ryder it's a really nice Command processor , i tried it it not works with all commands but with them it works its very fast 0003-0006 mili seconds!
Respuesta: rCmd.inc - Easiest way to create commands! -
Gryphus One - 16.06.2012
But do I need to declare the commands in OnPlayerCommandText like with dcmd, or should it be enough with writing the functions?
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 16.06.2012
Nope, just the functions like in the examples.
Re: rCmd.inc - Easiest way to create commands! -
Jonny5 - 16.06.2012
Quote:
Originally Posted by RyDeR`
You will also need my DynamicParams.inc include. (Will create a seperate topic for this include soon).
|
Not sure if this ever made it to its own topic,
if so could someone point me to it.
and is it okay to use this in other projects?
thx
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 16.06.2012
Quote:
Originally Posted by Jonny5
Not sure if this ever made it to its own topic,
if so could someone point me to it.
and is it okay to use this in other projects?
thx
|
Ah, forgot about that! But yes, you're free to use it in other projects.
Re: rCmd.inc - Easiest way to create commands! -
TheRoss - 16.06.2012
Quote:
Originally Posted by RyDeR`
As I see this command system is getting more and more attention, I've planned to re-write this with many bug fixes (if there are), performance tweaks and new features and maybe integrate the DynamicParams.inc to the include itself so you just have to download one thing.
Beside this, I'm not sure what makes this incompatible for some people, but I will try figure out soon.
|
Thanks you. This command processor so very nice. I will wait for fix.
Re: rCmd.inc - Easiest way to create commands! -
Niko_boy - 16.06.2012
@Ryder`
Oh i would love to see another release of it
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 16.06.2012
Important fix!
Guess I just found why some commands would work and some would not. For some reason I used break to stop the loop when the index wasn't found, while there are commands in the remaining indexes. Here's a simple fix, open the include and replace this:
pawn Code:
if(!GetPublicNameByIndex(i, s_szFunc, sizeof(s_szFunc))) {
break;
}
with this:
pawn Code:
if(!GetPublicNameByIndex(i, s_szFunc, sizeof(s_szFunc))) {
continue;
}
and it should work just fine! I changed it in the download link too.
Re: rCmd.inc - Easiest way to create commands! -
TheRoss - 16.06.2012
Quote:
Originally Posted by RyDeR`
Important fix!
Guess I just found why some commands would work and some would not. For some reason I used break to stop the loop when the index wasn't found, while there are commands in the remaining indexes. Here's a simple fix, open the include and replace this:
pawn Code:
if(!GetPublicNameByIndex(i, s_szFunc, sizeof(s_szFunc))) { break; }
with this:
pawn Code:
if(!GetPublicNameByIndex(i, s_szFunc, sizeof(s_szFunc))) { continue; }
and it should work just fine! I changed it in the download link too.
|
Very nice. Thanks you. Now everything works fine.
Sorry my bad English.
Re: rCmd.inc - Easiest way to create commands! -
Hiddos - 13.08.2012
Is optional parameters a feature which is going to be implemented soon?
Re: rCmd.inc - Easiest way to create commands! -
Erdbeerpudding - 14.10.2012
Is there any way to put a "z" for optional string?
Re: rCmd.inc - Easiest way to create commands! -
Plovix - 22.10.2012
Can i use this with OnPlayerCommandText callback(strcmp)?
AW: rCmd.inc - Easiest way to create commands! -
Logan_Adams - 03.01.2013
Hello,
i have a very big Problem.
some of my commands work and some doesn't work and the server returns "SERVER: Unknown Command."
For example /supcar works but /ban not.
I have removed OnPlayeCommandText, dont have any other CMD System.
Here the Code of a CMD, who doesnt work e.g. and returns SERVER: Unknown Command:
Code:
rCmd[iii]->veh(playerid,success,vid,c1,c2)
{
new Float:Pos[4],vehid;
if(!success)return SendClientMessage(playerid,ROT,"Benutze: /veh [Modelid des Fahrzeugs] [Farbe 1] [Farbe 2]");
if(!IsAdmin(playerid,6))return ZugriffVerweigert(playerid,0,0,6);
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
GetPlayerFacingAngle(playerid,Pos[3]);
vehid = CreateVehicle(vid,Pos[0],Pos[1],Pos[2],Pos[3],c1,c2,_NEVER);
SetVehicleNumberPlate(vehid,"~> Admin <~");
PutPlayerInVehicle(playerid,vehid,0);
SetPVarInt(playerid,"vehicleid",vehid);
SendClientMessage(playerid,GRЬN,"Du hast ein Admincar gespawnt. Dies wird nach dem Verlassen wieder automatisch gelцscht!");
return 1;
}
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 04.01.2013
To all people experiencing problems with this include, I'm about to rewrite it with more features and make it more stable, the current one has some problems with the memory I guess, it gets all messed up after some time.
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 05.01.2013
I managed to integrate sscanf2 plugin with this include, it's working great and I'm pretty sure you'll like it too! Once I'm %100 sure it's stable enough, I will release it. Stay tuned.
Re: rCmd.inc - Easiest way to create commands! [NEW v0.2.0 ─ 6/01/2013] -
RyDeR` - 05.01.2013
I'm sorry for a third post in row, but it's to announce that I finally released the awesome version of rCmd! sscanf plugin is fully integrated now (which means you can now use optional parameters, and all other features of sscanf). Please make sure you read the Syntax part again, it's very important!
Quote:
Originally Posted by RyDeR`
Changelog- 06/01/2013 - v0.2.0:
- Rewrote the whole include, as well as DynamicParams.inc. I found some critical bugs that made this include completely worthless, but I'm sure it's completely fixed now and is %100 to use.
- sscanf plugin is fully integrated now and automatically makes use of all features of the sscanf plugin.
- Just make sure you read "Syntax" part of the topic again as there are some important things to note:
Quote:
Syntax
Code:
rCmd["specifiers"]->commandname(playerid, success, ...)
NEW (IMPORTANT NOTES):- You can use all sscanf specifiers in the specifiers input, yes, literally whole sscanf.
- Note the quotes around specifiers in this new version. It's not necessary, but when you use brackets for optional parameters, it will give you errors without the quotes.
- You have to use & in front of all non-array variables (floats, integers, ..., NOT playerid and success) because DynamicParams.inc is passes the address of the value. If you skip this, the value of the integer/float will be wrong. Example:
Code:
rCmd["us[24]"]->setname(playerid, success, &targetid, name[]) {
// ...
return 1;
}
|
|
Re: rCmd.inc - Easiest way to create commands! -
vMapper - 06.01.2013
Wow, never saw a scripted literally combined with sscanf, so i don't need sscanf.inc?
Re: rCmd.inc - Easiest way to create commands! -
RyDeR` - 06.01.2013
No, you NEED sscanf.
Re: rCmd.inc - Easiest way to create commands! -
Logan_Adams - 08.01.2013
Hi Ryder,
I thank you for your update.
Now all Commands are working