Weapon Damage System gives health?
#1

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;
        }
    }
Title says all, it's under OnPlayerGiveDamage.

Assistance would be appreciated.
Reply
#2

PHP Code:
newam armour+amount;
    
newam2 Health+amount
They're too weird idk.
Whatever can you share your BodyPartDamage function Mr. High-Roller?
Reply
#3

yeah a redefined system need it because as default decrease in health needs to be restored and custom decrease is added simultaneously
Reply
#4

I know that,?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)