08.11.2013, 15:29
Hey Guys, I Am here with my first tutorial about how to use ZMCD.
Downloaded ZCMD? But dont know how to use it?? Well, im gonna tell u my best.
i prefer to use sscnf too.
So first, we areg onna make some defines.
Now, ill tell u a simple cmd, like /healme!
Was'nt it easy? now if u want this cmd only be usable my RCON login admins?
Here u get it
CMD:healme(playerid, params[]) // this will tell the server the cmd to heal
{//opening brackets
If(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You Are Not Authorized To Use This Command!"); //this will check if the player is admin or not
SetPlayerHealth(playerid, 100); //this function will set the player's health to 100 whoever uses this cmd
return 1; //this is the return
} //closing brackets[/CODE]
Done! look its so easy!
i tried my best to teach u something even if im also not a good scripter.
remember to rep!
Have fun!
Downloaded ZCMD? But dont know how to use it?? Well, im gonna tell u my best.
i prefer to use sscnf too.
So first, we areg onna make some defines.
Код:
//put these on top of ur script! #include a_samp // this is the main include in scripting #include zmcd //this is the define which will use zcmd in script #include sscanf2 //it loads sscanf
Код:
//put this anywhere in ur script: CMD:healme(playerid, params[]) // this will tell the server the cmd to heal { //opening brackets SetPlayerHealth(playerid, 100); //this function will set the player's health to 100 whoever uses this cmd return 1; //this is the return } //closing brackets
Here u get it
CMD:healme(playerid, params[]) // this will tell the server the cmd to heal
{//opening brackets
If(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You Are Not Authorized To Use This Command!"); //this will check if the player is admin or not
SetPlayerHealth(playerid, 100); //this function will set the player's health to 100 whoever uses this cmd
return 1; //this is the return
} //closing brackets[/CODE]
Done! look its so easy!
i tried my best to teach u something even if im also not a good scripter.
remember to rep!
Have fun!