10.06.2016, 23:12
pawn Code:
new Float: armour;
GetPlayerArmour(damagedid, armour);
GetPlayerHealth(damagedid, Health);
newam = armour+amount;
newam2 = Health+amount;
if(armour > 0)
{
if(weaponid == 22) SetPlayerArmour(damagedid, newam-15);//m4
if(weaponid == 31) SetPlayerArmour(damagedid, newam-25);//m4
if(weaponid == 30) SetPlayerArmour(damagedid, newam-20);//ak
if(weaponid == 34) SetPlayerArmour(damagedid, newam-90);//sniper
if(weaponid == 29) SetPlayerArmour(damagedid, newam-20);//mp5
if(weaponid == 24) SetPlayerArmour(damagedid, newam-30);//deagle
if(weaponid == 4) SetPlayerArmour(damagedid, newam-35);//knife
if(weaponid == 26) SetPlayerArmour(damagedid, newam-25);
}
if(armour == 0)
{
CauseOfInjury[damagedid] = weaponid;
if(weaponid == 22)
{
SetPlayerHealth(damagedid, newam2-15);//9mm
BodyPartDamage[damagedid][bodypart] += newam2-15;
}
if(weaponid == 31)
{
SetPlayerHealth(damagedid, newam2-25);//m4
BodyPartDamage[damagedid][bodypart] += newam2-25;
}
if(weaponid == 30)
{
SetPlayerHealth(damagedid, newam2-20);//ak
BodyPartDamage[damagedid][bodypart] += newam2-20;
}
if(weaponid == 34)
{
SetPlayerHealth(damagedid, newam2-90);//sniper
BodyPartDamage[damagedid][bodypart] += newam2-90;
}
if(weaponid == 29)
{
SetPlayerHealth(damagedid, newam2-20);//mp5
BodyPartDamage[damagedid][bodypart] += newam2-20;
}
if(weaponid == 24)
{
SetPlayerHealth(damagedid, newam2-30);//deagle
BodyPartDamage[damagedid][bodypart] += newam2-30;
}
if(weaponid == 4)
{
SetPlayerHealth(damagedid, newam2-35);
BodyPartDamage[damagedid][bodypart] += newam2-35;
}
if(weaponid == 26)
{
SetPlayerHealth(damagedid, newam2-25);//swn
BodyPartDamage[damagedid][bodypart] += newam2-25;
}
else
{
BodyPartDamage[damagedid][bodypart] += amount;
}
}
Assistance would be appreciated.