#pragma semicolon 1
#include <amxmodx>
#include <reapi>
public plugin_init()
{
register_plugin("Gibs (No Blood)", "1.0.0", "fl0wer");
register_message(SVC_TEMPENTITY, "@SVC_TempEntity");
RegisterHookChain(RG_CBasePlayer_Spawn, "@CBasePlayer_Spawn_Post", true);
RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed_Pre", false);
RegisterHookChain(RG_CGib_Spawn, "@CGib_Spawn_Post", true);
}
@SVC_TempEntity(id, dest, player)
{
if (get_msg_arg_int(1) != TE_BLOODSTREAM)
return PLUGIN_CONTINUE;
return PLUGIN_HANDLED;
}
@CBasePlayer_Spawn_Post(id)
{
set_member(id, m_bloodColor, DONT_BLEED);
}
@CBasePlayer_Killed_Pre(id, attacker, gib)
{
SetHookChainArg(3, ATYPE_INTEGER, GIB_ALWAYS);
}
@CGib_Spawn_Post(id)
{
set_member(id, m_Gib_lifeTime, 0.0);
}