Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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:

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4. using System.Text;
  5.  
  6. namespace ClassLibrary1
  7. {
  8. public class Class1:CPlugin
  9. {
  10. public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
  11. {
  12. if (DamageMod == "MOD_FALLING")
  13. {
  14. Damage = 0;
  15. }
  16. if (Weapon.Contains("ak47"))
  17. {
  18. Damage = 500;
  19. }
  20. if (Weapon.Contains("deserteagle"))
  21. {
  22. Damage = 3000;
  23. }
  24. return Damage;
  25. }
  26. }
  27. }


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:

CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using Addon;
  4. using System.Text;
  5.  
  6. namespace ClassLibrary1
  7. {
  8. public class Class1:CPlugin
  9. {
  10. public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, string Weapon, int Damage, string DamageMod, HitLocations HitLocation)
  11. {
  12. if (DamageMod == "MOD_FALLING")
  13. {
  14. Damage = 0;
  15. }
  16. if (Weapon.Contains("ak47"))
  17. {
  18. Damage = 500;
  19. }
  20. if (Weapon.Contains("deserteagle"))
  21. {
  22. Damage = 3000;
  23. }
  24. return Damage;
  25. }
  26. }
  27. }


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 4,691 09-29-2013, 19:46
Last Post: Nekochan
Question Help Team DAMAGE offhand E-losev 0 2,427 09-17-2013, 12:03
Last Post: E-losev
  guys like increase the damage from falls? SaviouR9966 7 4,192 01-26-2013, 13:42
Last Post: Pozzuh
  incease Damage for GUID only islamsaab 8 4,197 11-13-2012, 10:00
Last Post: islamsaab
  Health and damage and custom comments mbakerinnv 1 2,008 11-01-2012, 15:09
Last Post: d0h!
  Help Disable fall damage Puffiamo 5 4,807 10-23-2012, 14:50
Last Post: Puffiamo
  Damage table surtek 3 3,456 09-18-2012, 08:30
Last Post: aosma8
  [Request] Damage to zombie [Z00MBY] Alex 0 1,802 04-12-2012, 06:53
Last Post: [Z00MBY] Alex
  Increase damage Lemon 8 4,273 04-07-2012, 10:40
Last Post: Lemon
  How to edit direct impact damage? frozenliquid 6 3,672 11-29-2011, 22:08
Last Post: frozenliquid

Forum Jump:


Users browsing this thread:
1 Guest(s)

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