Browse docs

Shared Job APIs

Connect Creator jobs to Jobs Base duty, employees, salary, garage, business and tablet APIs.

Creator jobs use sky_jobs_base for shared gameplay. Call the owner named in each reference; adding sky_jobcreator to an export name does not expose another copy of the API.

Read a player's job

Server · sky_jobs_base. getPlayerJobInfo(playerId) takes an online player's numeric server ID. It returns { job, grade, gradeLabel, onDuty }, or nil when the player is invalid or not loaded.

server.lua
-- player_source is the actual source of your authorized server request.
local info = exports["sky_jobs_base"]:getPlayerJobInfo(player_source)
if not info then
    print("Job lookup failed: the player is not loaded")
    return
end

print(info.job, info.grade, info.gradeLabel, info.onDuty)

job is the technical job key, not its display label. Keep real grade numbers, including gaps; a grade is not an array position. Resolve current identity, job and duty on the server rather than trusting a client copy.

Duty

Server · sky_jobs_base. setPlayerDuty(playerId, onDuty) takes a numeric player server ID and an explicit boolean. It returns whether the resulting cached duty state matches the requested state. It uses the shared duty pipeline; it does not create a duty-capable job or grant your caller permission.

server.lua
-- Run only after your integration has authorized this change.
local changed = exports["sky_jobs_base"]:setPlayerDuty(player_source, false)
if not changed then
    print("The requested duty state could not be applied")
end

See Duty for isPlayerOnDuty and getOnDutyPlayers.

Feature references

FeatureAPI reference
Employee membership, hiring and grade changesPlayers & Members
Rank and management permissionsPermissions
Work-time salary controlsSalary
Society balances and money changesSociety Money
Invoice creation and confirmed payment eventsBilling
Business status and announcementsBusiness server API and client API
Shared job inventoryStorage server API and client API
Vehicles spawned by an external garageExternal Garage Integration
Radial actions and player interactionsRadial Menu and Player Interactions
Documents and tablet integrationsJobs Base client exports
Shared library startupLibrary and Startup

A shared API being available does not enable every feature for every job. The job's saved feature settings, provider, permissions, duty and resource exclusions still apply. Generic Creator jobs do not gain specialized Police, Ambulance, Mechanic, Fire, Crime or DOJ gameplay by calling a shared export.

Job definitions and gameplay configuration have different owners. Use the Creator administration workflow to create/edit framework definitions, and its shared configuration sections for locations and feature settings. Employee and duty exports operate on the existing job; they do not create or configure that job.