03.01.2013, 19:32
Aqui amigo, isto deve funcionar, um sistema anti-lag, se for isso que vocк quer.
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new
Float:Colete,
Float:Vida;
GetPlayerArmour(damagedid, Colete);
GetPlayerHealth(damagedid, Vida);
if(Colete > 0)
{
if(amount > Colete)
{
Dano = amount - Colete;
Vida = Vida - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Vida);
return 1;
}
Colete = Colete - amount;
SetPlayerArmour(damagedid, Colete);
}
if(Colete < 1)
{
Vida = Vida - amount;
SetPlayerHealth(damagedid, Vida);
}
return true;
}

