Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
S4t3K - 30.06.2014
@Slash : Then give us a logical explaination to the fact mcmd is slower than zcmd for example :
• mcmd skips a huge part of SAMP's default command processing
• mcmd doesn't interact with the pawn but directly with the server
• zcmd uses OnPlayerCommandText when mcmd doesn't
If you can give me one which could be correct, then I'd start to believe what you say.
Re: Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
ikkentim - 30.06.2014
Quote:
Originally Posted by S4t3K
@Slash : Then give us a logical explaination to the fact mcmd is slower than zcmd for example :
• mcmd skips a huge part of SAMP's default command processing
• mcmd doesn't interact with the pawn but directly with the server
• zcmd uses OnPlayerCommandText when mcmd doesn't
If you can give me one which could be correct, then I'd start to believe what you say.
|
I'm no expert, but
"mcmd doesn't interact with the pawn but directly with the server" is bullshit. This plugin is supposed to do something with the user's input, right? Which means it is interaction with the amx runtime.
"zcmd uses OnPlayerCommandText when mcmd doesn't": so what? It's still accessing the runtime.
"mcmd skips a huge part of SAMP's default command processing": samp doesn't do anything but call a single callback; this isn't heavy or very time-consuming.
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
sammp - 30.06.2014
Never seen this before.
I'll use it if ****** and Kalcor approve of it.
But as far as im concerned isnt Memory hacking banned for samp?
Re: Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
Ciandlah - 01.07.2014
Quote:
Originally Posted by ikkentim
I'm no expert, but
"mcmd doesn't interact with the pawn but directly with the server" is bullshit. This plugin is supposed to do something with the user's input, right? Which means it is interaction with the amx runtime.
"zcmd uses OnPlayerCommandText when mcmd doesn't": so what? It's still accessing the runtime.
"mcmd skips a huge part of SAMP's default command processing": samp doesn't do anything but call a single callback; this isn't heavy or very time-consuming.
|
+1 This is a total defect
AW: Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
Mellnik - 01.07.2014
Quote:
Originally Posted by SlashPT
No.. The speed must be measured by the run time it takes until pawn can call the next function.. and it seems that it's slower than other command processors..
|
It does. The speedtest by ****** creates a hook to OnPlayerCommandText which will then call the zcmd code. This does not work with mcmd as OnPlayerCommandText was erased. So to test the speed I've created a native function to call the internal detour. There is no other way to measure mcmd, so saying it's slower is wrong.
Quote:
Originally Posted by ikkentim
I'm no expert, but
"mcmd doesn't interact with the pawn but directly with the server" is bullshit. This plugin is supposed to do something with the user's input, right? Which means it is interaction with the amx runtime.
"zcmd uses OnPlayerCommandText when mcmd doesn't": so what? It's still accessing the runtime.
"mcmd skips a huge part of SAMP's default command processing": samp doesn't do anything but call a single callback; this isn't heavy or very time-consuming.
|
1. It means that mcmd doesn't need OnPlayerCommandText be called in order to retrieve playerid and cmdtext like other plugin based cmd processors. Please read the thread carefully before calling it bullshit.
2. I'm not sure what you mean by runtime but mcmd skips all that and just calls OnPlayerRequestCommand and afterwards the command itself; less than zcmd does.
3. You can't see it that way. When SA-MP calls OnPlayerCommandText, no command processing has been done yet, just the callback was called, nothing else.
Quote:
Originally Posted by sammp
I'll use it if ****** and Kalcor approve of it.
|
Why do you need their approval? As long as it runs stable you should decide by facts. But at it's current state nobody should use mcmd for other than testing.
Quote:
Originally Posted by Ciandlah
+1 This is a total defect 
|
Why don't you guys read the thread or check the source? I haven't even created this to reveal a "better" cmd processor to you. y_commands is already perfect with it's speed and functions.
So please don't see mcmd as a competitor; it's just my work I wanted to show.
Re: AW: Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
ikkentim - 02.07.2014
Quote:
Originally Posted by Mellnik
1. It means that mcmd doesn't need OnPlayerCommandText be called in order to retrieve playerid and cmdtext like other plugin based cmd processors. Please read the thread carefully before calling it bullshit.
2. I'm not sure what you mean by runtime but mcmd skips all that and just calls OnPlayerRequestCommand and afterwards the command itself; less than zcmd does.
3. You can't see it that way. When SA-MP calls OnPlayerCommandText, no command processing has been done yet, just the callback was called, nothing else.
|
1. Yes, as it injects right into the servers command processing, it's a layer right on/in the server process. No, it still touches the amx machine when a command is entered to execute logic. Please read S4t3k's statement before you call my bullshit bullshit

2. What I mean is that it still touches the amx machine, it still executes logic. The only moment the amx machine isn't touched is when an invalid command is entered (unless OnPlayerRequestCommand is called; idk, didn't test).
3. He says samp's default command processing and as you just kindly explained, there is no default processing, only processing scripted in pawn (which is none by default).
Quote:
Why don't you guys read the thread or check the source? I haven't even created this to reveal a "better" cmd processor to you. y_commands is already perfect with it's speed and functions.
So please don't see mcmd as a competitor; it's just my work I wanted to show.
|
I'm not saying this to blame your performance. I agree with you that trying to create an extremely fast command processor is unnecessary. In no situation more than 1000 commands are called in one second. Creating the most efficient command processor is just somewhat of a tournament on these forums. I totally like what you made and it is a creative way of doing it.

I was merely stating that S4t3k's post is wrong.
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
ikey07 - 02.07.2014
You deserve a cookie, just cuz of this:
http://i.imgur.com/veUXSa2.png
Did you really printed and used a pen? haven't seen it for a while in the PC world.
Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
S4t3K - 02.07.2014
@ikkentim : I don't think it was completely wrong. Have to say that I run to express myself without really thinking. If I discredited Mellnik work in any way, I ask to both of you to excuse me.
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
nGen.SoNNy - 03.07.2014
Nice job Mellnik. Can you tell how can i compile it for linux?
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
FahadKing07 - 05.07.2014
Oh man you released it too late :/ . My gamemode is already using ZCMD and converting to mcmd is impossible! Because it have too many cmds........
Anyways Great Work. Keep it up!
+REP 
[You will receive within 24 hours, just ran out of giving reps]
AW: Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
Mellnik - 05.07.2014
Quote:
Originally Posted by ikey07
You deserve a cookie, just cuz of this: http://i.imgur.com/veUXSa2.png
Did you really printed and used a pen? haven't seen it for a while in the PC world.
|
Haha yeah, helped me to understand it better.
Quote:
Originally Posted by nGen.SoNNy
Nice job Mellnik. Can you tell how can i compile it for linux?
|
It won't work on Linux yet anways so don't even try...
Quote:
Originally Posted by FahadKing07
Oh man you released it too late :/ . My gamemode is already using ZCMD and converting to mcmd is impossible! Because it have too many cmds........
|
Are you aware of CTRL + H? Makes life easier a lot :P
Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
S4t3K - 05.07.2014
Mellnik : There's actually a faster way than CTRL + H.
PHP Code:
#define CMD:%0(%1, %2) mcmd:%0(%1, %2)
Re: Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
FahadKing07 - 05.07.2014
Quote:
Originally Posted by S4t3K
Mellnik : There's actually a faster way than CTRL + H.
PHP Code:
#define CMD:%0(%1, %2) mcmd:%0(%1, %2)
|
Oh yea. Thats a good idea. I will try it
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
ShinichiKudou - 06.07.2014
you could just ctrl + h
CMD:
mcmd:
AW: mcmd Command Engine - Plugin based command processing - first of it's kind -
Mellnik - 26.09.2014
Got a Linux version up. The -03 optimization (on gcc 4.8.2?) made my hook function naked..
Would love some feedback
mcmd.so
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
Crayder - 26.09.2014
Now that there is a linux version, I may finally test, I think I have already repped you fro this, don't remember... But I love the idea...
Also I want to recommend something, just to make this look better!
pawn Code:
public OnPlayerRequestCommand(playerid, cmdtext[], exists)
{
if(!exists)
{
SendClientMessage(playerid, 0xFFFFFFFF, "This command does not exist!");
return 0;
}
return 1;
}
I think you should change this to...
pawn Code:
public OnPlayerRequestCommand(playerid, cmdtext[], exists)
{
if(!exists)
{
new Tmp[55];
format(Tmp, sizeof(Tmp), "The command <%s> does not exist, please check /cmds!", cmdtext);
SendClientMessage(playerid, 0xFFFFFFFF, Tmp);
return 0;
}
return 1;
}
It just makes your callback look really fancy...
EDIT: If there are mistakes in my example it's because i'm on my phone.
Re : mcmd Command Engine - Plugin based command processing - first of it's kind -
S4t3K - 26.09.2014
Well, what does change between your example and Mellnik's one ?
It's the same callback with the same parameters. It's just an efficient way to use all the parameters of the callback.
Most servers (based on old GF/LARP) have just a "This command doesn't exist. Please check /help" when a command doesn't exist. It's just to show how to do instead of using OnPlayerCommandText (because you don't here).
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
Rudy_ - 27.09.2014
Great, So this is better or zcmd or ycmd
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
nGen.SoNNy - 27.09.2014
And what should i do with things like:
pawn Code:
cmd_claninfo( playerid, inputtext );
?
And also.. can i change this.. with something better?
pawn Code:
format( gsString, 56, "/setrank %d %d", InvitedClanID[ playerid ], liRank );
return CallRemoteFunction( "OnPlayerCommandText", "is", playerid, gsString );
Re: mcmd Command Engine - Plugin based command processing - first of it's kind -
ReD_DeVi - 27.09.2014
Wow! Amazing!