How to set team.Joinable to false

I’m trying to figure out how to set team.Joinable of some team to false, i can check if its true or false, but i can’t figure out how to set it true or false. Any help will be appreciated. Thanks.

this might help you :

in the end it should look like this
team.SetUp ( <teamnumber> , “TeamNameHere”, Color (R,G,B,A), false )

also, put this in shared.lua

um, i’m not sure if you can do this, but from what i’m reading, and since someone Rated Shoaxthebeast bad reading, i’m thinking you want to set it on a button or a checkbox?

like i said i’m not 100% this is possible, but i don’t see why not.
CreateClientConVar( “team1_joinable”, “true”, false, false)
local SetTeam1 = vgui.Create( “DMultiChoice”)
SetTeam1:SetText(“Is Team joinable?”)
SetTeam1:AddChoice( “true” )
SetTeam1:AddChoice( “false” )
in shared:
team.SetUp(1, “Citizen”, Color(0,255,200,255),GetConVarString(“host1_joinable”))

Thanks to the one who rated me bad reading (seriously look at OP)
so you want to set if a team is joinable or not
team.SetUp ( <teamnumber> , “TeamNameHere”, Color (R,G,B,A), <boolean> )
–replace <boolean> with true if you want to make it joinable or to false if not

the team.Setup is for creating new teams though isnt it? Or will it still work if i use a team i have already created ? Thanks for the help, dont know why someone put you down for bad reading.

Edit. Let me clear this up a bit, i have already created a team, all i want to do is to set its Joinable property from true to false and visa versa. The team.SetUp overwrites my existing team when i use it after the team has already been created. Im looking for a command something like team.Joinable(teamid) = false. This is so that in the fretta team menu the button becomes disabled and you can’t click it. Sorry if i didnt explain it better before.