T2 // Gameplay & Base

coe_jobs

Careers, Professions & Dispatch

Career Progression Engine with Dynamic XP and Procedural Missions

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_economycoe_database
coe_jobs 9 exports · 0 commands

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

The employment framework of the ecosystem. Covers open professions (Trucker, Courier, Fisherman, Lumberjack, Miner) and municipal emergency careers (Police, EMS, Fire). Features procedural cargo delivery routes, on-time delivery bonus pay, and automated duty shift logging.

On FiveM Enhanced

Procedural route generation without spawning heavy client-side blips; mission events stream cleanly through the FiveM Enhanced event bus.

02 // FEATURES

What the module delivers

01

Procedural Route Generation

Freight missions dynamically calculate pickup and dropoff points across San Andreas.

02

Career XP & Ranks

Career progression unlocks higher pay grades and access to commercial heavy vehicles.

03

Automated Shift Clock-In

Duty clock-in automatically applies assigned service uniforms and access gear.

04

Direct Deposit Payroll

Wages and mission commissions deposit automatically via coe_economy.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Headless Operation (No UI)
Zero DOM · CoE UI Delegation
Headless
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // HEADLESS SERVICE

Headless Service (No Dedicated NUI)

Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.

Zero CEF graphic overhead: no background web pages or NUI bridges loaded
Typed public contracts (types.lua) consumed directly by external resources and UIs
Strict adherence to the Server-Authoritative model with zero direct DOM manipulation
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 9

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_jobs']:RegisterJob(definition) → true|string

Registers or updates a job definition. Ownership is tied to the invoking resource; upon resource stop, registered jobs are removed and active work sessions terminate cleanly.

ParameterType
definitionCoeJobDefinition
LUA
local result = exports['coe_jobs']:RegisterJob(definition)
exports['coe_jobs']:UnregisterJob(jobId) → boolean

Unregisters a job previously registered by the calling resource.

ParameterType
jobIdstring
LUA
local result = exports['coe_jobs']:UnregisterJob(jobId)
exports['coe_jobs']:ListJobs() → table[]

Returns the public job catalog (synchronized to clients).

No parameters.

LUA
local result = exports['coe_jobs']:ListJobs()
exports['coe_jobs']:IsReady() → boolean

Verifies if jobs database tables and migrations are ready. Third-party resources may also listen to the server event `coe_jobs:ready`.

No parameters.

LUA
local result = exports['coe_jobs']:IsReady()
exports['coe_jobs']:GetSession(playerId) → table|nil

Retrieves the active work session for an online player.

ParameterType
playerIdinteger
LUA
local result = exports['coe_jobs']:GetSession(playerId)
exports['coe_jobs']:GetProgress(characterId, jobId) → CoeJobProgress|nil

Retrieves career progress for a specific character in a designated job.

ParameterType
characterIdstring
jobIdstring
LUA
local result = exports['coe_jobs']:GetProgress(characterId, jobId)
exports['coe_jobs']:GetCareer(characterId) → table|nil

Retrieves the comprehensive career profile for a character (online or offline): overall level, reputation, skills, total time on duty (`workedSeconds`), and per-job records (level, payout bonus, requirements, `workedSeconds`, `firstAt`, `lastAt`). Used by community UI tablet apps and resumes.

ParameterType
characterIdstring
LUA
local result = exports['coe_jobs']:GetCareer(characterId)
exports['coe_jobs']:TabletVisible() → boolean

Checks if the Career tablet application is available (`coe_jobs` initialized).

No parameters.

LUA
local result = exports['coe_jobs']:TabletVisible()
exports['coe_jobs']:TabletCall(playerId, appId, action, payload) → table

Handles Career app queries: `profile` (career stats and recent work history) and `guide` (`payload.jobId`: how-to guide and player metrics). Available for custom community UI integration.

ParameterType
playerIdinteger
appIdstring
actionstring
payloadtable|nil
LUA
local result = exports['coe_jobs']:TabletCall(playerId, appId, action, payload)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.