Garry's Mod Wiki

Player

  Player Player( number playerIndex )

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

1 number playerIndex
The player index.

Returns

1 Player
The retrieved player.