hi,
I found this plugin:
Code:
#include amxmodx
#include fakemeta
#define HUD_OFFSET 296
public plugin_init()
{
register_menucmd(register_menuid("Spectate Menu"),(1<<0)|(1<<1),"Spectate_Menu")
register_event("DeathMsg","spectate_death","a")
register_event("ResetHUD","re_spectate","be")
register_clcmd("say spec","ShowMenu",-1,"Shows The menu")
register_clcmd("say spectate","ShowMenu",-1,"Shows The menu")
register_clcmd("say /spec","ShowMenu",-1,"Shows The menu")
register_clcmd("say /spectate","ShowMenu",-1,"Shows The menu")
register_concmd("spectate","hook_spectate")
register_concmd("spec","hook_spectate")
register_cvar("allow_spectators","1")
}
public Spectate_Menu(id,key)
{
switch(key)
{
case 0:
{
client_cmd(id,"spectate")
ShowMenu(id)
}
case 1:
{
//exit ?
}
}
}
public ShowMenu(id)
{
static keys, MenuBody[256], Len
keys = (1<<0|1<<1)
Len = format(MenuBody,255,"Spectate Menu^n^n")
Len += format(MenuBody[Len],255-Len,"^n1. Spectate Players And Play Game^n")
Len += format(MenuBody[Len],255-Len,"^n2. Exit")
show_menu(id,keys,MenuBody,-1)
}
public spectate_death(id)
{
static victim
victim = read_data(2)
ShowMenu(victim)
}
public re_spectate(id)
{
show_menu(id,0,"^n",1)
}
public hook_spectate(id)
{
if(pev(id,pev_iuser1) || pev(id,pev_iuser2))
{
spawn_player(id)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
spawn_player(id)
{
set_pev(id,pev_deadflag,DEAD_RESPAWNABLE)
dllfunc(DLLFunc_Spawn,id)
set_pev(id,pev_iuser1,0)
set_pev(id,pev_iuser2,0)
set_pdata_int(id,HUD_OFFSET,0)
static TeamInfo[16]
get_user_info(id,"model",TeamInfo,charsmax(TeamInfo))
message_begin(MSG_ALL,get_user_msgid("TeamInfo"))
write_byte(id)
write_string(TeamInfo)
message_end()
}
It fixes the spectate thing for HL. It works perfectly
, but it shows a menu when you get killed, and sometimes it messes up the map vote menu when it's time to choose a map
. So all i want is the spectate menu off
. I mean "No menu"
__________________