Garry's Mod Wiki

Garry's Mod Wiki

  string Player:SteamID()

Description

Returns the player's SteamID.

See Player:AccountID for a shorter version of the SteamID and Player:SteamID64 for the full SteamID.

It is recommended to use Player:SteamID64 over the other SteamID formats whenever possible.

In a -multirun environment, this will return STEAM_0:0:0 (serverside) or NULL (clientside) for all "copies" of a player because they are not authenticated with Steam.

For Bots this will return BOT.

Returns

1 string
"Text" representation of the player's SteamID.

Example

Prints the EntityID, Name and SteamID of all players.

for _, ply in ipairs( player.GetAll() ) do print( "[" .. ply:EntIndex() .. "]", ply:Name(), ply:SteamID() ) end
Output: A list consisting of every player's EntityID, Name & SteamID on the server.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...