AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Weapon Damagecontrol for mod/valve (https://forums.alliedmods.net/showthread.php?t=98665)

OGthc 07-27-2009 16:43

[REQ] Weapon Damagecontrol for mod/valve
 
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!


http://module.game-monitor.com/195.4...450x34/m21.png
http://module.game-monitor.com/94.12...50x34/ak47.png

slice231`SD 07-27-2009 18:54

Re: [REQ] Weapon Damagecontrol for mod/valve
 
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

anssik 07-27-2009 20:28

Re: [REQ] Weapon Damagecontrol for mod/valve
 
1 Attachment(s)
Try this. It lowers the HL shotgun damage by 20%. Untested, but should work.

hleV 07-27-2009 20:36

Re: [REQ] Weapon Damagecontrol for mod/valve
 
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; }

OGthc 07-30-2009 21:50

Re: [REQ] Weapon Damagecontrol for mod/valve
 
-------> 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 !!!

:up:

hleV 07-31-2009 06:48

Re: [REQ] Weapon Damagecontrol for mod/valve
 
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.


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

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