CreatorsServer exports
GetPlayerData
Last updated on
The public view of a connected player's loaded character.
local res = exports.opx_infinity:GetPlayerData(source)Scope read · sync.
Parameters
- source:
number— a connected player id
Returns
{ source, citizenId, userId, firstName, lastName, money, job, gang, jobs, gangs }— no metadatamoney,job,gang,jobs,gangshave the shapes of the Player object.
Errors
export.badArgument,error.notLoggedIn
local res = exports.opx_infinity:GetPlayerData(source)
if res.ok then print(res.value.firstName, res.value.citizenId) end