OPX//77
CreatorsServer exports

GetPlayerByCitizenId

Last updated on

The public view of an online character, found by citizen id.

local res = exports.opx_infinity:GetPlayerByCitizenId(citizenId)

Scope read · sync.

Parameters

  • citizenId: string

Returns

  • the same public view as GetPlayerData, for a character that is online

Errors

  • export.badArgument, error.notLoggedIn (nobody is playing that character)
Example
local res = exports.opx_infinity:GetPlayerByCitizenId('AB12CD34')
if res.ok then TriggerClientEvent('my_jobs:ping', res.value.source) end

On this page

No Headings