Garry's Mod Wiki

Revision Difference

Player:SteamID#551533

<function name="SteamID" parent="Player" type="classfunc"> <description> Returns the player's SteamID. See <page>Player:AccountID</page> for a shorter version of the SteamID and <page>Player:SteamID64</page> for the full SteamID. <note>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` on the server and on the client it returns `NULL`.</note> For Bots this will return `BOT`.</note> </description> <realm>Shared</realm> <rets> <ret name="" type="string">SteamID</ret> </rets> </function> <example> <description>Prints the EntityID, Name and SteamID of all players.</description> <code> for _, ply in ipairs( player.GetAll() ) do print( "[" .. ply:EntIndex() .. "]", ply:Name(), ply:SteamID() ) end </code> <output>A list consisting of every player's EntityID, Name & SteamID on the server.</output> </example>