Help damage
#1
Question 
help what code that would remove the damage from the fall? and the code that is: AK47 takes 500 hp (1 bullet) deagle 3000 hp Done
Reply

#2
(05-16-2013, 19:12)Jone Calerone Wrote: help what code that would remove the damage from the fall? and the code that is: AK47 takes 500 hp (1 bullet) deagle 3000 hp Done

you can disable falldamage with the speed plugin or that code should work too:

Code:
using System; using System.Collections.Generic; using Addon; using System.Text; namespace ClassLibrary1 { public class Class1:CPlugin { public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation) { if (DamageMod == "MOD_FALLING") { Damage = 0; } if (Weapon.Contains("ak47")) { Damage = 500; } if (Weapon.Contains("deserteagle")) { Damage = 3000; } return Damage; } } }

I didn't test the falling stuff though
Reply

#3
(05-16-2013, 19:25)8q4s8 Wrote:
(05-16-2013, 19:12)Jone Calerone Wrote: help what code that would remove the damage from the fall? and the code that is: AK47 takes 500 hp (1 bullet) deagle 3000 hp Done

you can disable falldamage with the speed plugin or that code should work too:

Code:
using System; using System.Collections.Generic; using Addon; using System.Text; namespace ClassLibrary1 { public class Class1:CPlugin { public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation) { if (DamageMod == "MOD_FALLING") { Damage = 0; } if (Weapon.Contains("ak47")) { Damage = 500; } if (Weapon.Contains("deserteagle")) { Damage = 3000; } return Damage; } } }

I didn't test the falling stuff though

In MW2(maybe mw3 too) 'MOD_TRIGGER_HURT' is also fall damage. I don't know why.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] CS addon for MW2(Sounds,show damage) Fl0w_.JACKDAN 1 6,294 09-29-2013, 19:46
Last Post: Nekochan
Question Help Team DAMAGE offhand E-losev 0 3,365 09-17-2013, 12:03
Last Post: E-losev
  guys like increase the damage from falls? SaviouR9966 7 5,984 01-26-2013, 13:42
Last Post: Pozzuh
  incease Damage for GUID only islamsaab 8 6,024 11-13-2012, 10:00
Last Post: islamsaab
  Health and damage and custom comments mbakerinnv 1 2,963 11-01-2012, 15:09
Last Post: d0h!
  Help Disable fall damage Puffiamo 5 6,267 10-23-2012, 14:50
Last Post: Puffiamo
  Damage table surtek 3 4,503 09-18-2012, 08:30
Last Post: aosma8
  [Request] Damage to zombie [Z00MBY] Alex 0 2,406 04-12-2012, 06:53
Last Post: [Z00MBY] Alex
  Increase damage Lemon 8 5,930 04-07-2012, 10:40
Last Post: Lemon
  How to edit direct impact damage? frozenliquid 6 5,213 11-29-2011, 22:08
Last Post: frozenliquid

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.