#include <amxmodx>
#include <reapi>
#include <fakemeta>
public plugin_init()
{
register_forward(FM_AddToFullPack, "AddToFullPackPost", 1);
register_message(get_user_msgid("CurWeapon"), "@MSG_CurWeapon");
}
public AddToFullPackPost(es, e, ent, host, hostflags, player, pSet)
{
if (player && pev_valid(ent) && pev_valid(host) && is_user_alive(ent) && is_user_alive(host))
{
set_es(es, ES_Solid, SOLID_NOT);
set_es(es, ES_Spectator, true);
set_es(es, ES_Mins, 0);
set_es(es, ES_Maxs, 0);
}
return FMRES_IGNORED;
}
@MSG_CurWeapon(iMsg, iDest, iPlayer)
{
if (get_msg_arg_int(2) != any:WEAPON_KNIFE)
return;
set_msg_arg_int(2, ARG_BYTE, CSW_KNIFE);
set_msg_arg_int(3, ARG_BYTE, -1);
}