Damage help!
#5

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:Armour, Float:Health;
    GetPlayerArmour(playerid, Armour);
    GetPlayerHealth(playerid, Health);
    if(Armour > 0)
    {
        switch(weaponid)
        {
            case 22, 27: return SetPlayerArmour(playerid, Armour - 30);
            case 28, 32: return SetPlayerArmour(playerid, Armour - 15);
            case 23, 33: return SetPlayerArmour(playerid, Armour - 35);
            case 24, 25: return SetPlayerArmour(playerid, Armour - 40);
            case 29: return SetPlayerArmour(playerid, Armour - 18);
            case 30: return SetPlayerArmour(playerid, Armour - 34);
            case 31: return SetPlayerArmour(playerid, Armour - 37);
            case 34: return SetPlayerArmour(playerid, Armour - 300);
        }
    }
    else
    {
        switch(weaponid)
        {
            case 22, 27: return SetPlayerHealth(playerid, Health - 30);
            case 28, 32: return SetPlayerHealth(playerid, Health - 15);
            case 23, 33: return SetPlayerHealth(playerid, Health - 35);
            case 24, 25: return SetPlayerHealth(playerid, Health - 40);
            case 29: return SetPlayerHealth(playerid, Health - 18);
            case 30: return SetPlayerHealth(playerid, Health - 34);
            case 31: return SetPlayerHealth(playerid, Health - 37);
            case 34: return SetPlayerHealth(playerid, Health - 300);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Damage help! - by Zachlive - 14.09.2012, 00:55
Re: Damage help! - by Lordzy - 14.09.2012, 01:05
Re: Damage help! - by Zachlive - 14.09.2012, 01:28
Re: Damage help! - by Zachlive - 14.09.2012, 21:57
Re: Damage help! - by clarencecuzz - 14.09.2012, 22:57
Re: Damage help! - by SuperViper - 14.09.2012, 23:22
Re: Damage help! - by KoczkaHUN - 14.09.2012, 23:32

Forum Jump:


Users browsing this thread: 1 Guest(s)