Code:
#include <amxmodx>
#include <hamsandwich>
const DMG_NADE = (1<<24)
public plugin_init()
{
register_plugin( "No Self-Nade + Damage", "1.1", "Wrecked" )
RegisterHam( Ham_TakeDamage, "player", "HamTakeDamagePre", 0 )
}
public HamTakeDamagePre( vic, inf, att, Float:dmg, dmgbits )
{
if( dmgbits & DMG_NADE )
{
if( vic == att )
return HAM_SUPERCEDE;
new Float:newdmg = dmg * 2 // use this variable to change the dmg
SetHamParamFloat( 4, newdmg )
}
return HAM_IGNORED;
}
__________________