Garry's Mod Wiki


  string Player:SteamID()


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.


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


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.