Player.GetPData

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:GetPData( String name [, Var default ] )
Where is this used?
Description:
Gets a persistent data value from a player.
Returns: String
Part of Library: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.GetPData]Player.GetPData [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints players' PData Name variables to their chat area.
Used onNewerServer.png
Code
for _, ply in pairs(player.GetAll()) do
    ply:ChatPrint(ply:GetPData("Name", "Variable Undefined!"))
end
OutputAll players will be told their PData Name variables, or warned that the variable doesn't exist.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox