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 i, 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.

Page Links


Special Pages


Wikis

?

Render Time: 29ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 12