Hi everyone! I need a plugin that can M6 at any time, whether alive or dead. I found this plugin, but it only works on the VGUI menu and has no effect on the old style menu. Can you fix it?
Код:
#include <amxmodx>
#include <reapi>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN "Spec Always"
#define VERSION "1.0"
#define AUTHOR "SmirnoffBG"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHookChain(RG_CBasePlayer_Spawn, "On_Spawn", 1)
RegisterHookChain(RG_HandleMenu_ChooseTeam, "ChooseTeam")
}
public SpecCMD(id)
{
rg_set_user_team(id, TEAM_SPECTATOR)
set_entvar(id, var_deadflag, DEAD_DEAD)
}
public On_Spawn(id)
{
//set_entvar(id, var_iuser3, get_entvar(id, var_iuser3) | (1 << 1))
set_pev(id, pev_iuser3, pev(id, pev_iuser3) | (1 << 1))
}
public ChooseTeam(id, MenuChooseTeam:slot)
{
set_member(id, m_bTeamChanged, false)
if(slot == MenuChoose_Spec)
{
rg_set_user_team(id, TEAM_SPECTATOR)
user_silentkill(id, 1)
set_entvar(id, var_deadflag, DEAD_DEAD)
}
//return HC_SUPERCEDE
}
Последнее редактирование: