OnPlayerTakeDamage.
#2

1) Do it like this

pawn Код:
switch(weaponid)
{
    case 24: { amount = 110; }
    case 22: { amount = 10; }
    ......
}
2)

pawn Код:
new Float:HP;
new Float:Armour;
GetPlayerHealth(playerid, HP);
GetPlayerArmour(playerid, Armour);

Armour -= amount;
HP -= Armour;
if(Armour > 0.0) SetPlayerArmour(playerid, Armour);
else
{
    SetPlayerArmour(playerid, 0.0);
    if(HP <= 0.0) SetPlayerHealth(playerid, 0.0);
    else SetPlayerHealth(playerid, HP);
}
Reply


Messages In This Thread
OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 18:36
Re: OnPlayerTakeDamage. - by Pottus - 14.06.2013, 18:51
Re: OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 19:12
Re: OnPlayerTakeDamage. - by DaniceMcHarley - 14.06.2013, 19:28
Re: OnPlayerTakeDamage. - by B-Matt - 14.06.2013, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)