The team library gives you access to the team system built into the Source engine, and allows you to create custom teams and get information about them.
Returns the team index of the team with the least players. Falls back to TEAM_UNASSIGNED
table team.GetClass( number index )
Returns the selectable classes for the given team. This can be added to with team/SetClass
table team.GetSpawnPoint( number index )
Returns a table of valid spawnpoint classes the team can use. These are set with team.SetSpawnPoint.
table team.GetSpawnPoints( number index )
Returns a table of valid spawnpoint entities the team can use. These are set with team.SetSpawnPoint.
boolean team.Joinable( number index )
Returns if a team is joinable or not. This is set in team.SetUp.
team.SetClass( number index, any classes )
Sets valid classes for use by a team. Classes can be created using player_manager.RegisterClass
team.SetSpawnPoint( number index, any classes )
Sets valid spawnpoint classes for use by a team. GM.TeamBased must be set to true for this to work
team.SetUp( number teamIndex, string teamName, table teamColor, boolean isJoinable = true )
Creates a new team.