create a global variable that handles if players are immuned or not about fall damage, change that variable when a player buy no fall damage, or die or whatever.
PHP Code:
const MAX_PLAYERS = 32
new g_bNoFallDamage[MAX_PLAYERS+1]
public plugin_init()
{
RegisterHam(Ham_TakeDamage, "player", "Ham_CBasePlayer_TakeDamage_Pre")
}
public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType )
{
if( iDamageType == DMG_FALL && g_bNoFallDamage[id] )
{
// SetHamParamFloat(4, 0.0)
SetHamReturnInteger(0)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
__________________