Garry's Mod Wiki


  string steamworks.GetPlayerName( string steamID64 )


We advise against using this. It may be changed or removed in a future update. You should use the callback of steamworks.RequestPlayerInfo instead.

Retrieves players name by their 64bit SteamID.

You must call steamworks.RequestPlayerInfo a decent amount of time before calling this function.


1 string steamID64
The 64bit Steam ID ( aka Community ID ) of the player


1 string
The name of that player


Retrieves name of local player.

steamworks.RequestPlayerInfo( LocalPlayer():SteamID64() ) timer.Simple( 1, function() -- this is not instant! print( steamworks.GetPlayerName( LocalPlayer():SteamID64() ) ) end )
Output: A name of local player is printed into console.