14.08.2012, 01:57
pawn Код:
CMD:heal(playerid, params[])
{
if(Class[playerid] == TEAM_MEDIC)
{
if(AlreadyHealed[playerid] == 0)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 70) SetPlayerHealth(playerid, health + 30);
else SetPlayerHealth(playerid, 100); //Prevents health going above 100. If you want to enable this, remove this line and the if statement above.
}
else return SendClientMessage(playerid, -1, "You must die first before you can heal again!");
}
else return SendClientMessage(playerid, -1, "You are not a medic!");
}