GMod update 72 made SteamID and UniqueID shared. This module has no purpose now.

Use and instead.

Purpose: This module adds one function. It behaves just like the server-side SteamID function.

Installation: Place gmcl_steamid.dll in “garrysmod\lua\includes\modules”.


//print the SteamIDs of everyone in the server
for k, ply in pairs(player.GetAll()) do

Download and source:

Getting an error? Install this:

Nice. Did you also include UniqueID()?

You made a mistake with the format. It should start with “STEAM_0:”, not “STEAM_:0:”.

this is generated on server I believe

It’s a hash of the steamID.

No. I might add UniqueID() later.

Fixed. Thanks.

I never got the use of steamid clientside.

This makes it easy to uniquely identify players in client-side scripts. For example, you can store all the names of players you have seen and identify them later even if they have changed their name completely. (I did not rate you dumb.)

I would generally use EntIndex for this, then you can get the player object with player.GetByID serverside and clientside.

You are missing the point. EntIndexes change from server to server. SteamIDs do not.

Hmm, good reason, I just got a idea for this ;).

Ratings dont mean shit to me.

I did miss the point, i thought you meant storing the player clientside for use on the same server.

A basic and kinda shitty script i made with this lol to store names on steamid clientside :D:
require( “steamid” )
require( “glon” ) – yer

local PlayerStorageTable = {}

local SafeConAdd = concommand.Add

local function LoadStorage()
if ( file.Exists( “PlayerInfoStorage/data.txt” ) ) then
local Data = glon.decode( file.Read( “PlayerInfoStorage/data.txt” ) )

	for k, v in pairs( Data ) do
		PlayerStorageTable[ k ] = v
	print( "Loaded player info storage" )
	PrintTable( PlayerStorageTable )

SafeConAdd( “storageinit”, LoadStorage )

local function UpdateStorage()
for k, v in pairs( player.GetAll() ) do
if ( PlayerStorageTable[ v:SteamID() ] == nil ) then
PlayerStorageTable[ v:SteamID() ] = {}
PlayerStorageTable[ v:SteamID() ].Names = { v:Nick() }

		file.Delete( "PlayerInfoStorage/data.txt" )
		file.Write( "PlayerInfoStorage/data.txt", glon.encode( PlayerStorageTable ) )
		if ( !table.HasValue( PlayerStorageTable[ v:SteamID() ].Names, v:Nick() ) ) then
			table.insert( PlayerStorageTable[ v:SteamID() ].Names, v:Nick() )
			file.Delete( "PlayerInfoStorage/data.txt" )
			file.Write( "PlayerInfoStorage/data.txt", glon.encode( PlayerStorageTable ) )

SafeConAdd( “updatestorage”, UpdateStorage )

local function PlayerInfoStorageMenu()
local DFrame = vgui.Create( “DFrame” )
DFrame:SetSize( 400, 400 )
DFrame:SetTitle( “PlayerInfoStorage Menu” )

local DListView = vgui.Create( "DListView" )
DListView:SetParent( DFrame )
DListView:SetSize( DFrame:GetWide() - 10, DFrame:GetTall() - 35 )
DListView:SetPos( 5, 30 )
DListView:SetMultiSelect( false )
DListView:AddColumn( "Name" )
DListView:AddColumn( "SteamID" )

for k, v in pairs( PlayerStorageTable ) do
	if ( PlayerStorageTable[ k ].Names[ 2 ] != nil ) then
		DListView:AddLine( PlayerStorageTable[ k ].Names[ 2 ], k )
		DListView:AddLine( PlayerStorageTable[ k ].Names[ 1 ], k )

DListView.OnClickLine = function( P, S, I )
	local ListPreviousNames = DermaMenu()
		local Line = S:GetValue( 2 )
		for k, v in pairs( PlayerStorageTable[ Line ].Names ) do
			ListPreviousNames:AddOption( v )

SafeConAdd( “storagemenu”, PlayerInfoStorageMenu )

Then how is different every server you join?

Hmm… This doesn’t seem to be working for me. I just found a use for this too…

I installed that thing in the OP, but I keep getting this error when the script loads.

error loading module 'steamid' from file 'c:\program files (x86)\steam\steamapps\blackops\garrysmod\garrysmod\lua\includes\modules\gmcl_steamid.dll':
	system error 14001

Well… Look like this module doesn’t like me for some reason.
So much for my SteamFriends look-a-like player list. xD

hash of client id and steam id?

or is the unique id the client id? whatever who gives a fuck

The module doesn’t work for me either, even after installing fix in the OP.

Install .Net Framework

Are you suggesting this because you know it will work, or because you think it might work? Why would this help?

Gatekeeper gave me that error on my server, I installed it and it worked.