RegisterHookChain( RG_CBasePlayer_Killed, "hook_PlayerKilled_Pre", .post = false );
public hook_PlayerKilled_Pre( const iVictim, const iKiller, iGib )
{
if( get_member( iVictim, m_LastHitGroup ) == HITGROUP_HEAD )
{
SetHookChainArg( 3, ATYPE_INTEGER, GIB_ALWAYS );
}
}
public plugin_init( )
{
RegisterHookChain( RG_CBasePlayer_Killed, "hook_PlayerKilled_Pre", .post = false );
RegisterHookChain( RG_CGib_Spawn, "hook_CGibSpawn_Post", .post = true);
}
public hook_PlayerKilled_Pre( const iVictim, const iKiller, iGib )
{
if( get_member( iVictim, m_LastHitGroup ) == HITGROUP_HEAD )
{
SetHookChainArg( 3, ATYPE_INTEGER, GIB_ALWAYS );
}
}
public hook_CGibSpawn_Post( const iGib )
{
set_member( iGib, m_Gib_lifeTime, 0.0 );
set_member( iGib, m_Gib_cBloodDecals, 0 );
}