Garry's Mod Wiki

Player:SteamID

Player:SteamID

string Player:SteamID()

Description

Returns the player's SteamID.

For Bots this will return BOT on the server and on the client it returns NULL.

See Player:AccountID for a shorter version of the SteamID and Player:SteamID64 for the Community/Profile formatted SteamID.

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.

Returns

1 string
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.

Special Pages


Wikis

?

Render Time: 56ms

DB GetPage 16
Generate Html 3
SaveChanges (1) 27
Render Body 0
Render Sidebar 6