Garry's Mod Wiki

util.GetPData

  string util.GetPData( string steamID, string name, string default )

Description

Gets persistent data of an offline player using their SteamID.

See also Player:GetPData for a more convenient version of this function for online players, util.RemovePData and util.SetPData for the other accompanying functions.

This function internally uses util.SteamIDTo64, it previously utilized Player:UniqueID which can cause collisions (two or more players sharing the same PData entry). This function now only uses the old method as a fallback if the name isn't found.

Arguments

1 string steamID
SteamID of the player, in the STEAM_0:0:0 format. See Player:SteamID.
2 string name
Variable name to get the value of
3 string default
The default value, in case there's nothing stored

Returns

1 string
The stored value