Raised This Month: $ Target: $400
 0% 

Damage he grenade mutil by another weapons?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 11-08-2013 , 05:14   Re: Damage he grenade mutil by another weapons?
Reply With Quote #2

Try this
PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <hamsandwich> 
#include <zombieplague> 

new P_Cvars[31]

const 
DMG_HEGRENADE = (1<<24)

public 
plugin_init() 

    
register_plugin("Damage Control""1.01""Fxfighter"
    
    
RegisterHam(Ham_TakeDamage"player""hook_TakeDamage"
    
    
P_Cvars[0] = register_cvar("amx_dmg","1"
    
P_Cvars[1] = register_cvar("amx_dmg_grenade","6.0"
     

public 
hook_TakeDamage(VictimUselessAttackerFloat:damagedamagebitsdamage_type

    if(!
get_pcvar_num(P_Cvars[0])) 
        return 
HAM_HANDLED
        
    
if(damage_type DMG_HEGRENADE)
    {    
        if(
Victim == Attacker)
            return 
HAM_SUPERCEDE
        
        
new Float:Dmg get_pcvar_float(P_Cvars[1])
        
        if(
Dmg != 1.0)
            
SetHamParamFloat(4damage*Dmg)
    }
        
    return 
HAM_IGNORED

__________________
alan_el_more 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 23:19.


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