Results 1 to 6 of 6

Thread: + damage for killing

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    + damage for killing

    how make +25 dmg to weapon ?
    pistol : normal dmg 15 +25
    mp44 ; normal dmg 32 +25

  2. #2
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    in Callback_Playerdamage()

    if(sWeapon == "colt_mp")
    iDamage = 40;

    only problem is it doesnt do hitLocs anymore. So damage on head is same as damage on the foot

  3. #3
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    not this , i need +30 dmg not = 30

  4. #4
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    PHP Code:
    iDamage int(iDamage 30); 

  5. #5
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Ni3ls View Post
    in Callback_Playerdamage()

    if(sWeapon == "colt_mp")
    iDamage = 40;

    only problem is it doesnt do hitLocs anymore. So damage on head is same as damage on the foot
    do a table of sHitLoc damage and adjust the damage according to where the hit location is. This is the one from COD4:

    PHP Code:
    getHitLocDamagesHitLoc )
    {
        switch( 
    sHitLoc )
        {
            case 
    "helmet":
            case 
    "head":
            case 
    "neck":
                return 
    60;
            case 
    "torso_upper":
            case 
    "right_arm_upper":
            case 
    "left_arm_upper":
            case 
    "right_arm_lower":
            case 
    "left_arm_lower":
            case 
    "right_hand":
            case 
    "left_hand":
            case 
    "gun":
                return 
    48;
            case 
    "torso_lower":
                return 
    40;
            case 
    "right_leg_upper":
            case 
    "left_leg_upper":
                return 
    32;
            case 
    "right_leg_lower":
            case 
    "left_leg_lower":
                return 
    10;
            case 
    "right_foot":
            case 
    "left_foot":
                return 
    5;
        }
        return 
    48;


  6. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    I use this myself to increase damage for weapons.

    PHP Code:
    if(GetCvarFloat("scr_wep_dmg_" sWeapon "_" sHitLoc) > 0)
        
    iDamage int(iDamage GetCvarFloat("scr_wep_dmg_" sWeapon "_" sHitLoc));
    else if(
    GetCvarFloat("scr_wep_dmg_" sWeapon) > 0)
        
    iDamage int(iDamage GetCvarFloat("scr_wep_dmg_" sWeapon)); 
    So if the dmg is 40 and scr_wep_dmg_mp44_mp is 2. Your damage will be 80. Or when scr_wep_dmg_mp44_mp_head is 4 your damage will be 160.
    Last edited by Mitch; 17th November 2013 at 18:00.

  7. The Following User Says Thank You to Mitch For This Useful Post:

    Ni3ls (18th November 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •