Player:SetPData

From Garry's Mod
Jump to: navigation, search
 Player:SetPData( )

Contents

Description

Sets a player's PData from the server's or client's SQL database ( sv.db and cl.db respectively ), It is not networked!

Arguments

any key

Name of the PData key

Arguments

any value

Value to write to the key (must be an SQL valid data type, such as a string or integer)

Returns

boolean

Whether the operation was successful or not

Examples

Example

Sets the key "money" from player 1's PData to 100

player.GetByID( 1 ):SetPData( "money", 100 )


Personal tools
Navigation