Garry's Mod Wiki

Player:Team

number Player:Team()

Description

Returns the player's team ID.

Returns 0 clientside when the game is not fully loaded.

Returns

1 number
The player's team's index number, as in the Enums/TEAM or a custom team defined in team.SetUp.

Example

Prints the name of the player's team

print( team.GetName( Entity( 1 ):Team() ) )
Output: Something like "Unassigned" in console.

Page Links


Special Pages


Wikis

?

Render Time: 30ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 9
Render Body 0
Render Sidebar 12