Player/Team

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
  
 
Returns 0 clientside when the game is not fully loaded.
 
Returns 0 clientside when the game is not fully loaded.
 +
For DarkRP: Your first job in your jobs.lua is the index number 1
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
Line 11: Line 12:
 
|type=number
 
|type=number
 
|desc=The player's team's index number, as in the {{Enum|TEAM}} or a custom team defined in {{LibraryFunction|team|SetUp}}.
 
|desc=The player's team's index number, as in the {{Enum|TEAM}} or a custom team defined in {{LibraryFunction|team|SetUp}}.
For DarkRP: Your first job in your jobs.lua is the index number 1
+
 
 
}}
 
}}
 
{{Example
 
{{Example

Revision as of 18:43, 24 April 2019

 Player:Team( )

Contents

Description

Returns the player's team ID.

Returns 0 clientside when the game is not fully loaded. For DarkRP: Your first job in your jobs.lua is the index number 1

Returns

number

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

Examples

Example

Prints the name of the player's team

print(team.GetName( Entity( 1 ):Team() ) )

Output:

Something like "Unassigned" in console.
Personal tools
Navigation