Fixed team menu. Should now work 100% to switch players between teams. However when client uses VGUI menus I haven't been able to close the class selecting window. It is (should be) only a cosmetic flaw though.

This commit is contained in:
Johnny Bergström 2005-08-22 08:01:01 +00:00
parent 53e6bb6b50
commit 70140ffc8f

View File

@ -458,14 +458,11 @@ public actionTeamMenu(id,key) {
case 1: client_print(0,print_chat,"%L",id,"ADMIN_TRANSF_1",name2,g_menuOption[id] ? "TERRORIST" : "CT" )
}
new limitt = get_cvar_num("mp_limitteams")
set_cvar_num("mp_limitteams",0)
user_kill(player,1)
engclient_cmd(player, "chooseteam")
engclient_cmd(player, "menuselect", g_menuOption[id] ? "1" : "2" )
engclient_cmd(player, "menuselect", "5")
client_cmd(player,"slot1")
set_cvar_num("mp_limitteams",limitt)
new limit_setting = get_cvar_num("mp_limitteams")
set_cvar_num("mp_limitteams", 0)
engclient_cmd(player, "jointeam", g_menuOption[id] ? "1" : "2")
engclient_cmd(player, "joinclass", "1")
set_cvar_num("mp_limitteams", limit_setting)
displayTeamMenu(id,g_menuPosition[id])
}