[Include] Life_Commands LifeCMD [New Command Processor]
#1

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:
Код:
# Include <LifeCMD>
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
Reply
#2

First.
Ooddodododdo nice!
Reply
#3

Quote:
Originally Posted by gabyk
Посмотреть сообщение
First.
Ooddodododdo nice!
Thank you.!
Reply
#4

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
Reply
#5

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
Why?
Reply
#6

Quote:
Originally Posted by aslan890
Посмотреть сообщение
Why?
We shouldnt need sscanf or strtok :P
Reply
#7

Quote:
Originally Posted by ikey07
Посмотреть сообщение
We shouldnt need sscanf or strtok :P
LoL lets just leave it like this its better
Reply
#8

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.
Reply
#9

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?
Reply
#10

I would prefer ZMCD, cause its going to have a new version with lots more features.

BTW nice one.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)