• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help weapon damage?
#1
why is the ksg doing 400+ damage?? the snipers all work as they should except the shotties?

Code:
if (Weapon.Contains("l96a1"))
            {
                Damage = 350;
            }
                  
             else if (Weapon.Contains("msr"))
            {
                Damage = 350;
            }            
            else if (Weapon.Contains("44magnum"))
            {
                Damage = 150;
            }
            else if (Weapon.Contains ("deserteagle"))
           {
                Damage = 75;
            }
            else if (Weapon.Contains ("1887"))
             {
                Damage = 250;
              }
            else if (Weapon.Contains ("ksg"))
             {
              Damage = 100;
             }
            else if (Weapon.Contains("striker"))
            {
                Damage = 100;
            }
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#2
Because there are pellets and each pellet will do 100 damage I think.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
[-] The following 1 user says Thank You to DidUknowiPwn for this post:
  • hillbilly
  Reply
#3
oh really, thats why then when i lowered it to 15 it still took away 100-120 hp
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#4
What if i wanted to select from a team?
as doing this sorta crashed it


if (Attacker.Team == Teams.Axis)

if (Weapon.Contains("shield"))
{
Damage = 200;
}
else if (Weapon.Contains("knife"))
{
Damage = 200;
}
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#5
Code:
if( attacker.team == team.axis )
{
if( weapon == x )
{
  iDamage = y;
}
}
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply
#6
Also instead of doing a shit load of if statements I suggest doing a switch.
Like so: switch( sWeapon from onPlayerDamage ) case "iw5_derp_mp": Damage = 0; break; etc. it's much cleaner.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
[-] The following 1 user says Thank You to DidUknowiPwn for this post:
  • hillbilly
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Change Campaign default weapon loadout (PS3) InherentResolve 3 1,493 04-28-2015, 12:33
Last Post: Gmzorz

Forum Jump:


Users browsing this thread: 1 Guest(s)