pawn Код:
// SCRIPT NO-LAG, Dano de armas editavel
#define FILTERSCRIPT
#include <a_samp>
#include <alss>
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new Float:HP, Float:Colete, Float:Dano;
GetPlayerArmour(damagedid, Colete);
GetPlayerHealth(damagedid, HP);
if(weaponid == 24){amount = 10;}//eagle
if(weaponid == 23){amount = 50;}//silencedcolt
if(Colete > 0)
{
if(amount > Colete)
{
Dano = amount - Colete;
HP = HP - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, HP);
return 1;
}
Colete = Colete - amount;
SetPlayerArmour(damagedid, Colete);
}
if(Colete < 1)
{
HP = HP - amount;
SetPlayerHealth(damagedid, HP);
}
return 1;
}
Include <ALSS>.