Help with Health and Armour (Limits)
#5

I'm sorry for not noticing that you sad you want +50 health. So here is the code for that!
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == lvapickup1)
    {
        new Float:armour;
        GetPlayerArmour(playerid,armour);
        if(armour < 50)
        {
            SetPlayerArmour(playerid, armor+50);
            GameTextForPlayer(playerid, "~g~Armour +50", 3000, 3);
        }
        else
        {
            SetPlayerArmour(playerid, 100);
            GameTextForPlayer(playerid, "~g~Armour 100%", 3000, 3);
        }
    }
    else if(pickupid == lvapickup2)
    {
        new Float:health;
        GetPlayerHealth(playerid,health);
        if(health < 50)
        {
            SetPlayerHealth(playerid, health+50);
            GameTextForPlayer(playerid, "~g~Health +50", 3000, 3);
        }
        else
        {
            SetPlayerHealth(playerid, 100);
            GameTextForPlayer(playerid, "~g~Health 100%", 3000, 3);
        }
    }
    return 1;
}
Once again I'm really sorry for not noticing.
Reply


Messages In This Thread
Help with Health and Armour (Limits) - by kbalor - 16.10.2014, 06:49
Re: Help with Health and Armour (Limits) - by RockyGamer - 16.10.2014, 07:52
Re: Help with Health and Armour (Limits) - by kbalor - 16.10.2014, 08:08
Re: Help with Health and Armour (Limits) - by Threshold - 16.10.2014, 08:15
Re: Help with Health and Armour (Limits) - by RockyGamer - 16.10.2014, 08:18
Re: Help with Health and Armour (Limits) - by kbalor - 16.10.2014, 08:22

Forum Jump:


Users browsing this thread: 1 Guest(s)