Garry's Mod Wiki

steamworks.GetPlayerName

  string steamworks.GetPlayerName( string steamID64 )

Description

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.

Arguments

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

Returns

1 string
The name of that player

Example

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.