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: 27ms

Session 0
DB GetPage 4
Generate Html 1
SaveChanges 7
Render Body 0
Render Sidebar 11