Garry's Mod Wiki

Revision Difference

Player:SteamID#512565

<function name="SteamID" parent="Player" type="classfunc">⤶ <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 <page>Player:AccountID</page> for a shorter version of the SteamID.⤶ </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 k, v in pairs( player.GetAll() ) do⤶ print( "[" .. v:EntIndex() .. "]", v:Name(), v:SteamID( ) )⤶ end⤶ </code>⤶ <output>A list consisting of every player's EntityID, Name &amp; SteamID on the server.</output>⤶ ⤶ </example>