Can I Use The zcmd Include? -
Hal - 24.07.2010
I have been recomended to use zcmd because it apparently would be faster in processing commands.
so im going to try to use it, but i would like to make sure i am right on how to convert all the cmds to use it. this is what im thinking:
Original CMD:
pawn Код:
if(strcmp(cmd, "/respawnallcars", true)
Now, i want to use ZCMD include:
ZCMD CMD:
pawn Код:
if(strcmp(zcmd, "/respawnallcars", true)
and ofcourse i would
But, are there any other includes like this that can optimise my server to make all commands run faster?
Which is the best, because if there are no others, ill use ZCMD.
Thanks- Hal
Re: Can I Use The zcmd Include? -
Kar - 24.07.2010
CMD:respawnallcars(playerid,params[])
dont put it under onplayercommand text..
Re: Can I Use The zcmd Include? -
Hal - 24.07.2010
im using that as an example command, should i just use what i shows above?
Re: Can I Use The zcmd Include? -
Kar - 24.07.2010
zcmd works like how i did it..
Re: Can I Use The zcmd Include? -
Hal - 24.07.2010
Quote:
Originally Posted by Kar
zcmd works like how i did it..
|
so my cmd would be like
pawn Код:
cmd:respawnallcars", true) == 0
{
if(IsPlayerConnected(playerid))
{
= is what would go in my script
Re: Can I Use The zcmd Include? -
Kar - 24.07.2010
no for christ sake
cmd:respawnallcars(playerid,params[])
dude just replace all ur strcmp headers thing to that and take them out of commandtext or all your strcmp/cmdtexts will stop working
Re: Can I Use The zcmd Include? -
Vince - 24.07.2010
No, forget about all the strcmp and strtok.
pawn Код:
CMD:respawnallcars(playerid, params[])
{
// code
return 1;
}
Re: Can I Use The zcmd Include? -
Kar - 24.07.2010
his strcmp cmds will stop working if he puts a zcmd cmd unless he puts them under the strcmp zcmd callback
if he leaves them under onplayercommandtext THEY WONT WORK
Re: Can I Use The zcmd Include? -
Hal - 24.07.2010
To clarify, this: i use it like this
pawn Код:
CMD:respawnallcars(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
//REST OF CMD
return 1;
}
And if i shouldnt put them under OnPlayerCommandText, i put them where?
Re: Can I Use The zcmd Include? -
Kar - 24.07.2010
anywhere esle in ur gm (not in a callback)