player.GetByUniqueID

From GMod Wiki

Jump to: navigation, search
Function
Syntax player.GetByUniqueID( String uniqueid )
Where is this used?
Description:
Retrieve a player object based upon his UniqueID
Returns: Player object if found, false if not found.
Part of Library: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetByUniqueID]Player.GetByUniqueID [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionThis example tries to find a player whose uniqueid is 21.
Used onNewerShared.png
Code
local pl = player.GetByUniqueID("21")
if pl then pl:PrintMessage(3, "Hello.") end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox