Raised This Month: $ Target: $400
 0% 

Ham Damage (Knife)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mentalproblems
Junior Member
Join Date: Mar 2019
Old 09-17-2019 , 08:29   Re: Ham Damage (Knife)
Reply With Quote #10

Ok thank you.

I'm not sure which one is correct IGNORED or SUPERCEDE
but I put supercede.

Is this okay now?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new g_pCvarDamage

public plugin_init() {
    
register_plugin("Knife Damage Multiplier""1.0""Nevermind")
    
    
RegisterHam(Ham_TakeDamage"player""Fw_TakeDamage_Post"0)
    
    
g_pCvarDamage register_cvar("rgc_knife_damage""2")
}

public 
Fw_TakeDamage_Post(iVictimiInflictoriAttackerFloat:fDamage// , bitsDamageType
{
    if (!
is_user_alive(iVictim) || !is_user_alive(iAttacker))
        return 
HAM_SUPERCEDE
    
    
if (get_user_weapon(iAttacker) == CSW_KNIFE)
    {
        
SetHamParamFloat(4fDamage get_pcvar_float(g_pCvarDamage)) // not sure if this line is correct
        
return HAM_SUPERCEDE
    
}
    
    return 
HAM_SUPERCEDE

mentalproblems 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 17:23.


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