View Single Post
PowereXe
Member
Join Date: Jan 2017
Location: Turkey, Istanbul
Old 05-29-2017 , 10:58   Re: No fall damage (Eliminates damage from falling!!)
Reply With Quote #29

Quote:
Originally Posted by OciXCrom View Post
Why are all of those complications necessary? This works just fine:

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

#define DMG_FALL (1<<5)

public plugin_init()
{
    
register_plugin("No Fall Damage""1.0""OciXCrom")
    
RegisterHam(Ham_TakeDamage"player""OnTakeDamagePre"0)
}

public 
OnTakeDamagePre(iVictimiInflictoriAttackerFloat:fDamageiBits)
    return 
iBits DMG_FALL HAM_SUPERCEDE HAM_IGNORED 
Working Without Cvar. That's The Which I Searched.
The Best Plugin Ever.
PowereXe is offline