Garry's Mod Wiki

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.