My team menu is accessibly with a simple console command

I’m currently making a gamemode, and the team menu is an incredibly simple menu shown in the gameode tutorials on wiki.

The team menu is available at any time by typing team_menu in the console.

I either want to make the console unavailable (this would solve another issue too) or make that command unusable after your team is chosen.

Any help would be much appresiated. Thanks :slight_smile:

Add this line to your team menu:
[lua]if ply:Team() == TEAM_ONE or ply:Team() == TEAM_TWO or ply:Team() == TEAM_SEXY then return end[/lua]

Replace ply with your player object, and TEAM_ONE, TEAM_TWO, and TEAM_SEXY with the selectable teams’ enumerations.

Wow, thanks. I know this is stupid, but does it go under the frame set up thing?

Thanks again, never had an answer that quick.

It goes at the top of the function.