Garry's Mod Wiki

Player:SteamID

string Player:SteamID()

Description

Returns the player's SteamID. In singleplayer, this will be STEAM_ID_PENDING serverside.

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

Use Player:AccountID for a shorter version of the SteamID.

Returns

1 string
SteamID

Example

Prints the EntityID, Name and SteamID of all players

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

Page Links


Special Pages


Wikis

?

Render Time: 39ms

Session 0
DB GetPage 5
Generate Html 5
SaveChanges 19
Render Body 0
Render Sidebar 8