team.BestAutoJoinTeam
From GMod Wiki
Revision as of 19:47, 6 May 2011 by | PoKi | Judge Dredd (Talk | contribs)
| 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 |