Browse docs

Documents

View your own document, inspect another player's document, or present your document to one or more nearby players.

Choose an export

I want to…Client exportWhose screen?
Look at my own documentViewOwnDocumentMine
Inspect another player's documentInspectPlayerDocumentMine
Show my document to one playerPresentOwnDocumentToPlayerThe selected player's
Show my document to everyone nearbyPresentOwnDocumentNearbyNearby players'; mine too with includeSelf = true

Use Sky Jobs Base 1.56.0 or newer. Call these exports from a client event, command handler or thread after Jobs Base has started. The calls yield while Jobs Base handles the request. Use "identity" for an ID card, "licenses" for held licenses, or "service" for a service ID.

Show my ID to everyone nearby and myself for five seconds

local success, openedCount, reason = exports["sky_jobs_base"]:PresentOwnDocumentNearby("identity", {
    includeSelf = true,
    durationMs = 5000,
})

if not success then
    print(("Could not show ID: %s"):format(reason or "unavailable"))
end

ViewOwnDocument(documentType, options?)

Opens your own document on your screen. You do not need a job inspection permission.

local success, reason = exports["sky_jobs_base"]:ViewOwnDocument("licenses")

InspectPlayerDocument(documentType, targetServerId, options?)

Opens another player's document on your screen. Pass the selected player's positive integer server ID. The inspection requires the corresponding identity or licenses permission, including job, grade and duty requirements. The target must be restrained by Jobs Base (handcuffs or zip ties), within 2.5 metres, and in the same routing bucket. Service IDs use the identity permission. Use ViewOwnDocument for your own character.

local success, reason = exports["sky_jobs_base"]:InspectPlayerDocument("identity", targetServerId)

PresentOwnDocumentToPlayer(documentType, recipientServerId, options?)

Opens your document on one selected player's screen. Pass their positive integer server ID. You must be within 2.5 metres of the recipient, in the same routing bucket, and free of restraints. The recipient needs their screen free of other focused menus. No job inspection permission is required. The radial also offers this under Player interactions → Documents.

local success, reason = exports["sky_jobs_base"]:PresentOwnDocumentToPlayer("service", recipientServerId, {
    durationMs = 8000,
})

PresentOwnDocumentNearby(documentType, options?)

Opens your document on eligible nearby players' screens. The server picks the recipients in your routing bucket. The same presentation rules apply as for one recipient. Players with another focused menu are skipped. Set includeSelf = true to include your own screen; this also works when you're alone. Presenting a document does not transfer an item.

OptionWhat it doesDefault
includeSelfAlso open the card on your screen. Must be a boolean.false
radiusDistance in metres. Must be greater than 0 and at most 2.5.2.5
durationMsHow long the card stays open on each screen, in milliseconds.60000

Display duration and external card providers

All four exports accept { durationMs = 5000 } as the last argument. Use a whole number from 1000 to 60000. The timer starts when Jobs Base opens the card on each viewer's screen. The viewer can still close it early with Enter or Escape.

Presentation always uses the shared Jobs Base card. For self views and inspections, passing durationMs also selects the shared card so Jobs Base can close it on time. Omit the option to keep your configured card provider. The shared card then closes after 60 seconds; external providers manage their own closing behaviour.

Return values

ViewOwnDocument, InspectPlayerDocument and PresentOwnDocumentToPlayer return success, reason. PresentOwnDocumentNearby returns success, openedCount, reason. For a nearby presentation, success is true if at least one card opened. The count includes your own screen when it opened with includeSelf = true. If no card opens, the count is 0 and reason describes a failed check or delivery.

ReasonMeaning
invalid_document_typeUse identity, licenses or service.
invalid_optionsPass a table for options and a boolean for includeSelf.
invalid_durationPass a whole number from 1000 to 60000 for durationMs.
invalid_radiusPass a radius greater than 0 and at most 2.5.
invalid_targetThe server ID is invalid or has no loaded character, or you passed your own ID instead of using the self option.
no_recipientsNo players with a loaded character were within range for the nearby request.
busyA viewer has another focused menu, an offer is pending, or the request was rate limited.
too_farA player was outside the permitted range or routing bucket, or had no usable ped.
restrainedYou cannot present a document while restrained.
target_not_restrainedInspection requires the target to be restrained by Jobs Base.
not_authorizedAn inspection or character check failed.
disabledThe relevant document feature is disabled.
storageJobs Base could not read or store service ID settings or numbers. Check the service card tables and oxmysql.
unavailableThe document or provider could not complete the request.

Access and provider hooks can return additional reasons. For an external card, true means the provider handoff was accepted; the provider controls what appears on screen.

Legacy exports

Existing scripts can keep using these names with their original arguments:

Legacy exportSame action as
ShowOwnDocument(documentType)ViewOwnDocument: look at your own document on your screen.
ShowPlayerDocument(documentType, targetServerId)InspectPlayerDocument: inspect the selected player's document on your screen.
PresentOwnDocument(documentType, recipientServerId)PresentOwnDocumentToPlayer: show your own document on the recipient's screen.

After importing Jobs Base, these client functions are also available on Sky_Jobs, for example Sky_Jobs.ViewOwnDocument("identity"). See Player Documents for card settings and Service IDs and Numbers for service ID setup.