team.BestAutoJoinTeam
From GMod Wiki
Function | |
Syntax |
team.BestAutoJoinTeam( ) Where is this used? |
Description: | |
Returns the smallest team. | |
Returns: | Number |
Part of Library: | team |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Team.BestAutoJoinTeam]Team.BestAutoJoinTeam [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Auto-assign player to open team upon join. |
---|---|
Used on | Gamemodes |
Code | function GM:PlayerInitialSpawn( ply ) self.BaseClass:PlayerInitialSpawn( ply ) ply:SetTeam ( team.BestAutoJoinTeam() ) end |
Output |