Quote:
Originally Posted by Fitries
how to kill 2000 health zombie with 4 HE only ?
|
This should work, to change damage multiplier use cvar "he_damage_multi".
PHP Code:
#include <amxmodx>
#include <hamsandwich>
const DMG_HEGRENADE = (1<<24)
new CvrNadeDamage
public plugin_init()
{
register_plugin("No HE SelfDamage", "0.0.1", "wbyokomo")
RegisterHam(Ham_TakeDamage, "player", "OnTakeDamage")
CvrNadeDamage = register_cvar("he_damage_multi", "8.0")
}
public OnTakeDamage(victim, inflictor, attacker, Float:damage, damagetype)
{
if(!is_user_connected(attacker)) return HAM_IGNORED;
if(attacker == victim) return HAM_SUPERCEDE;
if(damagetype & DMG_HEGRENADE)
{
damage *= get_pcvar_float(CvrNadeDamage)
SetHamParamFloat(4, damage)
return HAM_IGNORED;
}
return HAM_IGNORED;
}
If you are using CZBot then you need to RegisterHamFromEntity.