Team_menu spawns when you join the server. I want that, so its good. I want to things,

#1: When they choice a class, it exits.
#2: It wont pop up when ANYONE joins.

[lua]include( “shared.lua” )

function set_team()

frame = vgui.Create( “DFrame” )
frame:SetPos( 100, ScrH() / 2 ) //Set the window in the middle of the players screen/game window
frame:SetSize( 200, 210 ) //Set the size
frame:SetTitle( “Change Your Team!” ) //Set title
frame:SetVisible( true )
frame:SetDraggable( true )
frame:ShowCloseButton( true )

team_1 = vgui.Create( “DButton”, frame )
team_1:SetPos( 30, 30 )
team_1:SetSize( 100, 50 )
team_1:SetText( “Inmates” )
team_1.DoClick = function() //Make the player join team 1

 RunConsoleCommand( "team_1" ) 
 RunConsoleCommand( "kill" )


team_2 = vgui.Create( “DButton”, frame )
team_2:SetPos( 30, 85 ) //Place it next to our previous one
team_2:SetSize( 100, 50 )
team_2:SetText( “Police” )
team_2.DoClick = function() //Make the player join team 2

 RunConsoleCommand( "team_2" ) 
 RunConsoleCommand( "kill" )


concommand.Add( “team_menu”, set_team ) [/lua]

I don’t really understand what your asking. Is english your primary language?

It’s easy to make the frame close after you open it:
team_2.DoClick = function() //Make the player join team 2
frame:Close() --Closes Frame
RunConsoleCommand( “team_2” )
RunConsoleCommand( “kill” )
end [/lua]

If Close() doesn’t work you could just do…
[lua]Button.DoClick = function()
Frame:SetVisible( false )

Thanks a lot. Yes, I was born in California. When you join the server I want my menu to pop up. When it pops up you can choice a class. When you pick the class you want I want it too go away. But when doing some closed beta testing I found that when any way joins the server the menu will pop up for even me which is not what I want too happen.

I think it might be:
[lua]hook.Add(“PlayerInitialSpawn”, “PickMenu”, <your name of function here> )[/lua]
Slap that at the end of what you have.