Scripting with zcmd tutorial ( for beginers ) -
Rabea - 20.01.2015
hello everybody, this newbie scripters tutorial for scripting with zcmd.
Steps for using zcmd:
1. You must download the include of zcmd Here
http://sampff.weebly.com/download.html, press f3 and type ZCMD.inc .
2. Add the "Zcmd.inc" file to pawno\include.
3. Include the zcmd by type #include <zcmd> at top of pawno.
Okey, now the steps of scripting with zcmd.
1. To script you need to do this
pawn Code:
CMD:mycommand(playerid, params[])
{
//my codes
return 1;
}
What is "my codes"?
All new scripters ( i'm one of them lmao ) asks why all scripters type on tutorials "My codes" and what is this?
let me give an example what is this.
examples:
pawn Code:
SetPlayerHealth(playerid, amount);
SetPlayerArmor(playerid, amount);
PutPlayerInVehicle(playerid, seatid);
and to send a message to cmd typer you must do this.
pawn Code:
SendClientMessage(playerid, COLORYOUWANT, " test command ");
and here you done, imma make full command.
pawn Code:
CMD:healme(playerid, params[]) // thats first setup
{
SetPlayerHealth(playerid, 100); // this is the second setup "mycodes"
SendClientMessage(playerid, -1, " You has been healed ");
return 1;
}
// the " } " depands in how many " { " there is in the command. if you add two " { " and close with one " } " it will give you alot of errors.
Credits:
Thanks to Zeekx for ZCMD
Description:
Sorry for my bad english, i'm just beginer scripter sorry if there any mistake ( i don't think there is ).
This is my first release.
Re: Scripting with zcmd tutorial ( for beginers ) -
CalvinC - 20.01.2015
You could explain a bit more about brackets, like you do at the ending, or what the "return 1", or params does, since you're making the tutorial for beginners.
Re: Scripting with zcmd tutorial ( for beginers ) -
Neufox - 20.01.2015
Whats special in this?
Probabily its not even better than those other tutorials about zcmd on forums.
Re: Scripting with zcmd tutorial ( for beginers ) -
Rabea - 20.01.2015
its not a special tutorial.
my point to learn how to make tutorials and helping beginers.
I hope you understand me.
Re: Scripting with zcmd tutorial ( for beginers ) -
EgyptForLife - 20.01.2015
Not a bad tutorial due to beginner but you could have explained what return 1; and others are and speak about brackets just like CalvinC said.
Re: Scripting with zcmd tutorial ( for beginers ) -
Rabea - 20.01.2015
Thx, this tutorial can be counted as "test".
Next time i will make simple and nice one.