|
|
#1 |
|
Guest
Posts: n/a
|
Forcing Team Menu
i'm really new at coding in source, so please bear with me.
![]() i just want to write a script that forces the team menu to popup whenever a client goes into spec mode. i'm not sure how to do this. i've checked the vgui_drawtree and seen that the "team" is a popup, not a panel, is this right? i've found vgui_togglepanel but it doesn't work, nor did i really think it would, since "team" is classed as a popup. right? like i said, i'm really new to this. it seems like this should be something simple. am i missing something that should be obvious? is this impossible? thanks in advance. |
|
|
|
#2 |
![]() Join Date: Mar 2008
Reputation: 0
Posts: 37
|
Try adding this call in hl2mp_player.cpp in CHL2MP_Player::ChangeTeam after the lines that read:
if ( iTeam == TEAM_SPECTATOR ) { RemoveAllItems( true ); State_Transition( STATE_OBSERVER_MODE ); // try putting it here } this->ShowViewPortPanel( PANEL_TEAM, true, 0 ); ShowViewPortPanel works in hl2mp_client.cpp in FinalizePutInServer and the pointer there is of type CHL2MP_Player so that should have some effect. |
|
|
|
|
|
#3 | |
![]() Join Date: Sep 2006
Reputation: 9
Posts: 2,691
|
Quote:
Not a good idea. Make sure you've named all your panels correctly, (Case matters) |
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|