Life_Commands LifeCMD [New Command Processor] - Fastest -
aslan890 - 02.01.2013
Description:
This is a new shell that was created by me ( Kazon ).
It is based on ZCMD but with great speed he wins ZCMD from 100 to 150 ms
Each team has its own function in ZCMD but is directly over CallLocalFunction and CallRemoteFunction
Unlike from ZCMD .
Installation:
You only need to register # include
PHP code:
Examples of writing teams:
Teams in LifeCMD are written the same way as in ZCMD
PHP code:
Код:
CMD : mycommand ( playerid , params []) / / (mycommand) your team is spelled without a stick (/)
{
/ / your code
return true ;
}
Or
PHP code:
Код:
LCMD : mycommand ( playerid , params []) / / (mycommand) your team is spelled without a stick (/)
{
/ / your code
return true ;
}
Or
PHP code:
Код:
COMMAND : mycommand ( playerid , params []) / / (mycommand) your team is spelled without a stick (/)
{
/ / your code
return true ;
}
Just as you see here uses parameters (params) as in ZCMD
And LifeCMD is also compatible with Sscanf
So if you already have ZCMD you can simply change the Include
Callbacks:
LifeCMD also not lagging behind other shells, and has callbacks such as:
PHP code:
Код:
Public OnPlayerCommandCall ( playerid , cmdtext [])
{
/ / playerid - Player ID | cmdtext - the team itself
return true ;
}
Public OnPlayerCommandCall (playerid, cmdtext []) - Called before using
PHP code:
Код:
Public OnPlayerCommandFinish ( playerid , cmdtext [], Success )
{
/ / playerid - Player ID | cmdtext - the team itself | success - true or false that is, whether there is a command or not
return true ;
}
Public OnPlayerCommandFinish (playerid, cmdtext [], Success) - Called after using the command
Example of use:
PHP code:
Код:
Public OnPlayerCommandCall ( playerid , cmdtext [])
{
printf ( "Player: '% s' using the command '% s'" , PlayerInfo [ playerid ] [ pName ], cmdtext );
return true ;
}
PHP code:
Код:
Public OnPlayerCommandFinish ( playerid , cmdtext [], Success )
{
if (! Success ) return SendClientMessage ( playerid , COLOR_LIGHTRED , "this command does not exist!" );
return true ;
}
Speed test:
I did the same test as provided ****** but slightly altered
is what showed my test: As you can see is ZCMD faster YCMD , and LifeCMD faster ZCMD test you can conduct yourself ( link below )
Download:
I got permission to share this in here. This is not my .inc the creator is ( Kazon )
My Dream is to be like ****** - Beta tester in my Dream
Re: Life_Commands LifeCMD [New Command Processor] -
gabyk - 02.01.2013
First.
Ooddodododdo nice!
Re: Life_Commands LifeCMD [New Command Processor] -
aslan890 - 02.01.2013
Quote:
Originally Posted by gabyk
First.
Ooddodododdo nice!
|
Thank you.!
Re: Life_Commands LifeCMD [New Command Processor] -
ikey07 - 02.01.2013
Try to make something like this:
pawn Код:
CMD:mycmd( playerid,params [][])
{
if(!strlen(params)) { CMD usage return 1; }
SetPlayerHealth(ReturnUser(params[0]),floatstr(params[1]));
}
I would marry you for that
Re: Life_Commands LifeCMD [New Command Processor] -
aslan890 - 02.01.2013
Quote:
Originally Posted by ikey07
Try to make something like this:
pawn Код:
CMD:mycmd( playerid,params [][]) { if(!strlen(params)) { CMD usage return 1; } SetPlayerHealth(ReturnUser(params[0]),floatstr(params[1])); }
I would marry you for that ![Cheesy](images/smilies/biggrin.png)
|
Why?
Re: Life_Commands LifeCMD [New Command Processor] -
ikey07 - 02.01.2013
Quote:
Originally Posted by aslan890
Why?
|
We shouldnt need sscanf or strtok :P
Re: Life_Commands LifeCMD [New Command Processor] -
aslan890 - 02.01.2013
Quote:
Originally Posted by ikey07
We shouldnt need sscanf or strtok :P
|
LoL lets just leave it like this its better
Re: Life_Commands LifeCMD [New Command Processor] -
Basssiiie - 03.01.2013
Hmm, I'm not sure about this. To be honest, this script looks very similar to ZCMD, only some variable names are changed and it's made "shorter" (less spaces, less returns/new lines).
Can you tell me what's actually different? What's in the script that causes LifeCMD to be quicker than ZCMD? Because I'm not seeing it.
Re: Life_Commands LifeCMD [New Command Processor] -
aslan890 - 03.01.2013
Quote:
Originally Posted by ******
You do realise that the new versions of ZCMD have a number of features you're missing to avoid crashing due to exploits? Also, the documentation in the first post is wrong - using that spacing will not work properly.
|
So how can i fix it?
Re: Life_Commands LifeCMD [New Command Processor] -
Excel™ - 03.01.2013
I would prefer ZMCD, cause its going to have a new version with lots more features.
BTW nice one.