team
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.
Methods
number team.BestAutoJoinTeam()
Returns the team index of the team with the least players. Falls back to TEAM_UNASSIGNED
table team.GetAllTeams()
Returns the real table consisting of information on every defined team
Returns the selectable classes for the given team. This can be added to with team. SetClass
Returns a table with all player of the specified team.
This function returns a sequential table, meaning it should be looped with ipairs instead of pairs for efficiency reasons.
Returns a table of valid spawnpoint classes the team can use. These are set with team. SetSpawnPoint.
Returns a table of valid spawnpoint entities the team can use. These are set with team. SetSpawnPoint.
Returns if a team is joinable or not. This is set in team. SetUp.
Returns the amount of players in a team.
Sets valid classes for use by a team. Classes can be created using player_manager. RegisterClass
Sets valid spawnpoint classes for use by a team.
GM. TeamBased must be set to true for this to work
Creates a new team. See GM:CreateTeams for the hook to call this in.
Returns the total number of deaths of all players in the team.
Get's the total frags in a team.