Global/Player

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Added the returned value)
 
Line 6: Line 6:
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=No
 
|IsClass=No
|Name=Player
 
|Parent=Global
 
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 13: Line 11:
 
|name=playerIndex
 
|name=playerIndex
 
|desc=The player index.
 
|desc=The player index.
 +
}}
 +
{{Ret
 +
|type=Player
 +
|desc=The retrieved player.
 
}}
 
}}

Latest revision as of 05:36, 4 November 2016

 Player( )

Description

Returns the player with the matching Player:UserID.

For a function that returns a player based on their Entity:EntIndex, see Entity.
For a function that returns a player based on their connection ID, see player.GetByID.

Arguments

number playerIndex

The player index.

Returns

Player

The retrieved player.
Personal tools
Navigation