steamworks.GetPlayerName

From Garry's Mod
Jump to: navigation, search
 steamworks.GetPlayerName( )

Contents

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

You should use the callback of steamworks.RequestPlayerInfo instead.

Retrieves players name by his 64bit SteamID.

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

Arguments

string steamID64

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

Returns

string

The name of that player

Examples

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.
Personal tools
Navigation