07.12.2013, 23:43
Should this work as an anti lag shoot. Can't test since I'm not home
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
if(damagedid != INVALID_PLAYER_ID)
{
new Float:heath, Float:armour;
GetPlayerArmour(damagedid, armour);
GetPlayerHealth(damagedid, heath);
if(armour > 0)
{
if(amount > armour) {
SetPlayerArmour(damagedid, 0);
}
else SetPlayerArmour(damagedid, armour-amount);
}
else SetPlayerHealth(damagedid, heath-amount);
}
return 1;
}