Browse docs
Documents
Document views
These client-only exports belong to the new document-card update.
Supported types are exactly identity, licenses and service.
The view exports display on the caller's screen. PresentOwnDocument displays the sender's own
document to one selected nearby recipient.
Jobs Base must have finished starting. Call from a client event, command handler or thread that can yield while the server request completes.
ShowOwnDocument(documentType)
Shows the calling player's own card. The server selects the authenticated requesting character; no supplied target ID or identity fields can replace that owner. No job inspection grant is required for your own card.
local success, reason = exports["sky_jobs_base"]:ShowOwnDocument("identity")
For your own license view, pass "licenses" to ShowOwnDocument instead.
For your department service ID, pass "service".
Close the current card before opening another one.
ShowPlayerDocument(documentType, targetServerId)
Inspects another player's identity, licenses or service ID.
targetServerId must be a positive integer server ID, not a player index or ped handle.
Use ShowOwnDocument for your own character.
local targetServerId = 12 -- Resolve your selected player's server ID.
local success, reason = exports["sky_jobs_base"]:ShowPlayerDocument("identity", targetServerId)
The actor needs the corresponding identity or licenses inspection permission, with the
existing job, grade and duty rules. The server checks a maximum distance of 2.5 metres,
matching routing buckets and unchanged character identity after provider work. The target must
be restrained by Jobs Base (handcuffs or zip ties), including when inspected by Crime members.
Calling an export does not grant access.
Service-ID inspection uses the identity permission. The holder must have an employment
job; number allocation requires the new service-card tables and oxmysql.
PresentOwnDocument(documentType, recipientServerId)
Shows the sender's own document on one nearby player's screen. The server chooses the authenticated sender's character. No inspection grant is required; the sender cannot be restrained. Both players must remain within 2.5 metres in the same routing bucket. The recipient must have no other focused NUI. Offers are single-use and bound to both players' current characters. Presentation uses the shared card interface.
local success, reason = exports["sky_jobs_base"]:PresentOwnDocument("service", recipientServerId)
The radial also exposes these actions under Player interactions → Documents. This presents a document; it does not transfer an inventory item.
Return values
All three return success, reason?:
| Result | Meaning |
|---|---|
true | Shared-view opening was accepted, or an authorized native-provider handoff was accepted. It does not prove that an external provider rendered its UI. |
false, "invalid_document_type" | Type is not identity, licenses or service. |
false, "storage" | Service settings or number allocation could not be stored/read. Check the new tables and oxmysql. |
false, "disabled" | The master document switch or service-card switch is off in Jobs Base configuration. |
false, "invalid_target" | Invalid target, changed character, or your own ID supplied to ShowPlayerDocument. |
false, "busy" | The viewing client has another focused NUI, the recipient has a pending offer, or the request is rate-limited. |
false, "target_not_restrained" | Target inspection requires handcuffs or zip ties. |
false, "restrained" | A restrained sender cannot present their own document. |
false, "not_authorized" | Inspection permission or character binding failed. |
false, "too_far" | Target is too far away, in another routing bucket, or has no usable ped. |
false, "unavailable" | Request or configured provider could not supply the document. |
Access and custom-provider hooks can return their own existing failure reason. Handle failed requests explicitly instead of treating them as empty or successful cards.
RegisterCommand("myidentity", function()
local success, reason = exports["sky_jobs_base"]:ShowOwnDocument("identity")
if not success then
print(("Document view failed: %s"):format(reason or "unavailable"))
end
end, false)
After importing Jobs Base, the same client APIs are available as
Sky_Jobs.ShowOwnDocument(documentType) and
Sky_Jobs.ShowPlayerDocument(documentType, targetServerId) and
Sky_Jobs.PresentOwnDocument(documentType, recipientServerId).
Shared cards close with Return / Enter, Escape, or after 60 seconds. External providers retain their own interface and closing behaviour. See Player Documents for editable templates, position, size, optional branding and native integrations.