12.09.2015, 18:57 
	
	
	Quote:
| Retorne 0 caso a distвncia seja menor ou igual а que vocк considera prуxima. Ex: pawn Код: 
 | 
PHP код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
    PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
    amount = amount/2;
    new Float:Life, Float:Coleete, Float:Dano;
    GetPlayerArmour(damagedid, Coleete);
    GetPlayerHealth(damagedid, Life);
    //if(weaponid == 34){amount = 100;}//sniper
    if(Coleete > 0)
    {
        if(amount > Coleete)
        {
            Dano = amount - Coleete;
            Life = Life - Dano;
            SetPlayerArmour(damagedid, 0.0);
            SetPlayerHealth(damagedid, Life);
            return 1;
        }
        Coleete = Coleete - amount;
        SetPlayerArmour(damagedid, Coleete);
    }
    if(Coleete < 1)
    {
        Life = Life - amount;
        SetPlayerHealth(damagedid, Life);
    }
    return 1;
} 



