Player.UniqueID

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:UniqueID( )
Description:
Retrieves the players unique ID.
Returns: Integer
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.UniqueID]Player.UniqueID [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints the UniqueID of all the players into the console.
Used onNewerShared.png
Code
function PrintUniqueIDS()
    for _, v in ipairs( player.GetAll() ) do
        print( v:Nick().."'s UniqueID is: "..v:UniqueID() )
    end
end
OutputPlayers #names and #UniqueIDs.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox