Garry's Mod Wiki


  util.SetPData( string steamID, string name, any value )


Sets persistent data for offline player using their SteamID.

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

This function internally uses Player:UniqueID, which can cause collisions (two or more players sharing the same PData entry). It's recommended that you don't use it. See the related wiki page for more information.


1 string steamID
SteamID of the player, in the STEAM_0:0:0 format. See Player:SteamID.
2 string name
Variable name to store the value in.
3 any value
The value to store.