Raised This Month: $32 Target: $400
 8% 

[REQ] Weapon Damagecontrol for mod/valve


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OGthc
Junior Member
Join Date: May 2009
Old 07-27-2009 , 16:43   [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #1

Have tried to change and edit this nice script: (by fxfighter) http://forums.alliedmods.net/showthr...564#post595564
But i am too rookie and failed bad!

I look for someone out there who maby can rewrite this plug so it works in hldm1 or make a new one were I can lower shotgun damage in hldm.
The most important thing in my wish is "LOWER THE SHOTGUN DAMAGE like 20%" (running hldm/severian servers)

If anyone think he can write this for me please conntact me!


And thanks to this great site had found so many brilliant plugs here!




Last edited by OGthc; 07-27-2009 at 19:00.
OGthc is offline
slice231`SD
Senior Member
Join Date: Mar 2009
Location: Location: Location:
Old 07-27-2009 , 18:54   Re: [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #2

I think you don't need to modify the plugin. You just need to register your cvars in your cfg file

Example:
amx_dmg_scout 11

Try different numbers to find out the perfect damage
__________________

slice231`SD is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 07-27-2009 , 20:28   Re: [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #3

Try this. It lowers the HL shotgun damage by 20%. Untested, but should work.
Attached Files
File Type: sma Get Plugin or Get Source (shotgun_damage.sma - 785 views - 643 Bytes)
__________________

Last edited by anssik; 07-27-2009 at 20:30.
anssik is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-27-2009 , 20:36   Re: [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #4

EDIT: A bit too late.

Not tested.

Version #1:
Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich>   #define HLW_SHOTGUN 7   #define DAMAGE_MULTIPLIER 0.5 // Half less damage   public plugin_init() {         register_plugin("Shotgun Damage", "1.0", "hleV");           RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); }   public TakeDamage(Victim, Inflictor, Attacker, Float:Damage) {         if (get_pdata_int(Inflictor, 43, 4) == HLW_SHOTGUN)         {                 SetHamParamFloat(4, Damage * DAMAGE_MULTIPLIER);                   return HAM_HANDLED;         }           return HAM_IGNORED; }
Version #2:
Code:
#include <amxmodx> #include <hamsandwich>   #define HLW_SHOTGUN 7   #define DAMAGE_MULTIPLIER 0.5 // Half less damage   public plugin_init() {         register_plugin("Shotgun Damage", "1.0", "hleV");           RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); }   public TakeDamage(Victim, Inflictor, Attacker, Float:Damage) {         if (is_user_alive(Attacker) && get_user_weapon(Attacker) == HLW_SHOTGUN)         {                 SetHamParamFloat(4, Damage * DAMAGE_MULTIPLIER);                   return HAM_HANDLED;         }           return HAM_IGNORED; }
__________________
hleV is offline
Old 07-27-2009, 21:29
OGthc
This message has been deleted by OGthc. Reason: Updated respons...
OGthc
Junior Member
Join Date: May 2009
Old 07-30-2009 , 21:50   Re: [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #5

-------> anssik i tried your but I didnt get it to work THANKS for trying though!(Maby it was me doing something wrong.)

------>hleV I only tried your version 2 yet and it WORKS GREAT!
Whats the difference bewteeen the version1 and 2?

Once again THANKS !!!

OGthc is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-31-2009 , 06:48   Re: [REQ] Weapon Damagecontrol for mod/valve
Reply With Quote #6

In first verion there's less checks (if player is alive and weapon) but that pdata should only be meant for CS. I only though about it now.
__________________
hleV is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode