Quote:
Originally Posted by Bugsy
CrazY., the damage inflicted can be offset by armor that the player may have, so if a player has 100 hp and you inflict 80 damage, he may only get a loss in hp of 40. I would remove the pev_health part all together and just go a value that is guaranteed to kill, like SetHamParamFloat(3, 999.0). Your plugin was not working for me.
This works
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
const m_LastHitGroup = 75;
public plugin_init()
{
RegisterHam( Ham_TakeDamage , "player" , "HamTakeDamage" );
}
public HamTakeDamage( victim , inflictor , attacker , Float:fDamage , bitDamage )
{
if ( get_pdata_int( victim , m_LastHitGroup ) == HIT_HEAD )
{
SetHamParamFloat( 4 , 999.0 );
return HAM_HANDLED;
}
return HAM_IGNORED;
}
|
Hello Bugsy.
This works.
How can i change the amount of damage made by the headshot?
Like this?
SetHamParamFloat( 4 , 999.0 );
to
SetHamParamFloat( 4 , 110.0 );
Thanks