04.06.2012, 17:38
Veja se isto corrige:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new Float:Life, Float:Colete, Float:Dano;
GetPlayerArmour(damagedid, Colete);
GetPlayerHealth(damagedid, Life);
amount = amount/4;
if(Colete > 0)
{
if(amount > Colete)
{
Dano = amount - Colete;
Life = Life - Dano;
SetPlayerArmour(damagedid, 3.0);
SetPlayerHealth(damagedid, Life);
return 1;
}
else
{
Colete = Colete - amount;
}
SetPlayerArmour(damagedid, Colete);
}
else
{
Life = Life - amount;
SetPlayerHealth(damagedid, Life);
}
return 1;
}