06.04.2013, 07:10
Hi!
How can I make an admin command /heal [id] [How much health]
Sorry for my bad English...
How can I make an admin command /heal [id] [How much health]
Sorry for my bad English...
CMD:heal(playerid, params[])
{
new hp;
new destid;
if(sscanf(params,"ud",destid,hp)) return SCM(playerid, -1,"Usage: /heal <playerid> <ammount>");
SetPlayerHealth(destid,hp);
SendClientMessage(playerid, pink, "Player healed");
return 1;
}
CMD:heal(playerid, params[])
{
new pID, health;
if(sscanf(params, "ud", pID, health)) return SendClientMessage(playerid, -1, "/heal id health");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "Player not connected.");
SetPlayerHealth(pID, health);
return 1;
}
pawn Код:
|