Player/SteamID

From Garry's Mod
Jump to: navigation, search
 Player:SteamID( )

Contents

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

string

SteamID

Examples

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.
Personal tools
Navigation