Raised This Month: $ Target: $400
 0% 

[REQ] Weapon Damagecontrol for mod/valve


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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:00.


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