player.GetByID
From GMod Wiki
Function | |
Syntax |
player.GetByID( id ) Where is this used? |
Description: | |
Retrieve a player object based upon his entity index | |
Returns: | Player object. |
Part of Library: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.GetByID]Player.GetByID [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This example prints out the first player's name |
---|---|
Used on | |
Code | local player_1 = player.GetByID(1) Msg( player_1:Nick() .. "\n") |
Output | N/A |
Additional Notes
- The index is the players entity index which can get received by Player:EntIndex(). It has nothing to do with the userid.