steamworks.RequestPlayerInfo

From Garry's Mod
Revision as of 18:31, 21 December 2017 by Robotboy655 (Talk | contribs)
Jump to: navigation, search
 steamworks.RequestPlayerInfo( )

Contents

Description

Requests information of the player with SteamID64 for later use with steamworks.GetPlayerName.

Arguments

string steamID64

The 64bit Steam ID of player.

Arguments

function callback

A callback function with only 1 argument - string name.

Examples

Example

Gets and prints the steam name of the local player

steamworks.RequestPlayerInfo( LocalPlayer():SteamID64() )
timer.Simple( 1, function()
	print( steamworks.GetPlayerName( LocalPlayer():SteamID64() ) )
end )

Output:

The local player's name
Personal tools
Navigation