28.11.2011, 21:47
Ok I will try to explain you. Is very simple.
So the first thing you need to know is that if you are making the command with ZCMD you will NOT put it under public
but you will put it outside this. In the bottom of your script.
The second thing is including ZCMD in the script.
You include it by writing
at the top of the script.
Now I will show you the difference on the simple kick command.
So This is how are you writing now the command:
In ZCMD you will write it like this:
It's very simple and it doesen't slow your script.
And it's easy to convert
So the first thing you need to know is that if you are making the command with ZCMD you will NOT put it under public
pawn Код:
OnPlayerCommandText(playerid, cmdtext[])
The second thing is including ZCMD in the script.
You include it by writing
pawn Код:
#include <zcmd>
Now I will show you the difference on the simple kick command.
So This is how are you writing now the command:
pawn Код:
if(strcmp(cmdtext, "/kick") == 0)
{
Kick(playerid);
return 1;
}
pawn Код:
CMD:kick(playerid, params[])
{
Kick(playerid);
return 1;
}
And it's easy to convert