10.06.2016, 16:37
pawn Код:
if(armour > 0)
{
new Float: am = armour + amount;
if(weaponid == 22) SetPlayerArmour(damagedid, am-15);//m4
if(weaponid == 31) SetPlayerArmour(damagedid, am-25);//m4
if(weaponid == 30) SetPlayerArmour(damagedid, am-20);//ak
if(weaponid == 34) SetPlayerArmour(damagedid, am-90);//sniper
if(weaponid == 29) SetPlayerArmour(damagedid, am-20);//mp5
if(weaponid == 24) SetPlayerArmour(damagedid, am-30);//deagle
if(weaponid == 4) SetPlayerArmour(damagedid, am-35);//knife
if(weaponid == 26) SetPlayerArmour(damagedid, am-25);
}
if(armour == 0)
{
new Float: am2 = Health+amount;
CauseOfInjury[damagedid] = weaponid;
if(weaponid == 22)
{
SetPlayerHealth(damagedid, am2-15);//9mm
newam = Health+amount-15;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 31)
{
SetPlayerHealth(damagedid, am2-25);//m4
newam = Health+amount-30;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 30)
{
SetPlayerHealth(damagedid, am2-20);//ak
newam = Health+amount-25;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 34)
{
SetPlayerHealth(damagedid, am2-90);//sniper
newam = Health+amount-90;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 29)
{
SetPlayerHealth(damagedid, am2-20);//mp5
newam = Health+amount-20;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 24)
{
SetPlayerHealth(damagedid, am2-30);//deagle
newam = Health+amount-30;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 4)
{
SetPlayerHealth(damagedid, am2-35);
newam = Health+amount-35;
BodyPartDamage[damagedid][bodypart] += newam;
}
if(weaponid == 26)
{
SetPlayerHealth(damagedid, am2-25);//swn
newam = Health+amount-25;
BodyPartDamage[damagedid][bodypart] += newam;
}
else
{
BodyPartDamage[damagedid][bodypart] += amount;
}
}