team.GetAllTeams

From GMod Wiki

Jump to: navigation, search
Function
Syntax team.GetAllTeams( )
Where is this used?
Description:
Returns a table of teams and their data.
Returns: Table :Team
Part of Library: Team
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Team.GetAllTeams]Team.GetAllTeams [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example grabs the data of all teams.
Used onNewerShared.png
Code
	Test = table.ToString(team.GetAllTeams(), "Test") 
	print(Test)
Output
Test={[0]={Color={a=255,b=100,g=255,r=255,}, Joinable=false,Name="Joining/Connecting",Score=0,},
[1002]={Color=table: 04292A20, Joinable=true,Name="Spectator",Score=0,}, 
[1001]={Color=table:04292A20, Joinable=false,Name="Unassigned",Score=0,},}


Additional Notes

SHARED | 0000000000000000 | 00000000000000000 | TEAM_CONNECTING
SHARED | 0000000000001001 | 00000001111101001 | TEAM_UNASSIGNED
SHARED | 0000000000001002 | 00000001111101010 | TEAM_SPECTATOR

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox