- Joined
- Oct 15, 2008
- Messages
- 10
- Reaction score
- 1
Hello =),
i want to show you how to create command for restore health and armor it's so easy !.
to OnPlayerCommandText:
that's all
:
i want to show you how to create command for restore health and armor it's so easy !.
to OnPlayerCommandText:
PHP:
if(strcmp(cmd, "/hpap", true) == 0){
if(!IsPlayerAdmin(playerid)){ // check if player is admin
SendClientMessage(playerid, 0xFF0000FF, "You aren't admin.");
return 1;
}else{
SetPlayerHealth(playerid, 100); // set player's hp to 100
SetPlayerArmour(playerid, 100); // set player's armor to 100
SendClientMessage(playerid, 0x00FF00FF, "[-Admin-] Hp: **** Ap: 100 !");
}
return 1;
}
that's all
