|
}
public make_invis(id) {
if( !(get_user_flags(id) & ADMIN_RCON) )
return PLUGIN_CONTINUE
if(g_invisible[id][0])
{
client_print(id, print_console, "您不是无形的观众!")
g_invisible[id][0] = 0
return PLUGIN_HANDLED
}
if( is_user_alive(id) )
{
client_print(id, print_console, "你必须死后,才可以使用无形观众.")
return PLUGIN_HANDLED
}
g_invisible[id][0] = 1
client_print(id, print_console, "您现在一种无形的观众!")
new team = get_pdata_int(id, OFFSET_TEAM)
if( CS_TEAM_T <= team <= CS_TEAM_CT )
{
g_invisible[id][1] = team
set_pdata_int(id, OFFSET_TEAM, CS_TEAM_SPECTATOR)
}
else
{
new players[MAX_PLAYERS], tnum, ctnum
get_players(players, tnum, "e", "TERRORIST")
get_players(players, ctnum, "e", "CT")
g_invisible[id][1] = ctnum > tnum ? 1 : 2
}
send_ScoreAttrib(id, 0)
new teamname[12]
|
|