Medic Class
#5

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!");
}
Like this. I already created the variables I included here in my above post.
Reply


Messages In This Thread
Medic Class - by iOmar - 14.08.2012, 01:20
Re: Medic Class - by Kindred - 14.08.2012, 01:27
Re: Medic Class - by Cxnnor - 14.08.2012, 01:35
Re: Medic Class - by iOmar - 14.08.2012, 01:49
Re: Medic Class - by Kindred - 14.08.2012, 01:57

Forum Jump:


Users browsing this thread: 2 Guest(s)