Procedural Route Generation
Freight missions dynamically calculate pickup and dropoff points across San Andreas.
coe_jobsCareers, Professions & Dispatch
Career Progression Engine with Dynamic XP and Procedural Missions
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.
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.
Procedural route generation without spawning heavy client-side blips; mission events stream cleanly through the FiveM Enhanced event bus.
Freight missions dynamically calculate pickup and dropoff points across San Andreas.
Career progression unlocks higher pay grades and access to commercial heavy vehicles.
Duty clock-in automatically applies assigned service uniforms and access gear.
Wages and mission commissions deposit automatically via coe_economy.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
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.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
IsPlayerAceAllowed(src, "coe.admin")
exports.coe_audit:Record(severity, category, event, context)
Clean Architecture & HAL
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.
| Parameter | Type |
|---|---|
definition | CoeJobDefinition |
local result = exports['coe_jobs']:RegisterJob(definition)exports['coe_jobs']:UnregisterJob(jobId)
→ boolean
Unregisters a job previously registered by the calling resource.
| Parameter | Type |
|---|---|
jobId | string |
local result = exports['coe_jobs']:UnregisterJob(jobId)exports['coe_jobs']:ListJobs()
→ table[]
Returns the public job catalog (synchronized to clients).
No parameters.
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.
local result = exports['coe_jobs']:IsReady()exports['coe_jobs']:GetSession(playerId)
→ table|nil
Retrieves the active work session for an online player.
| Parameter | Type |
|---|---|
playerId | integer |
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.
| Parameter | Type |
|---|---|
characterId | string |
jobId | string |
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.
| Parameter | Type |
|---|---|
characterId | string |
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.
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.
| Parameter | Type |
|---|---|
playerId | integer |
appId | string |
action | string |
payload | table|nil |
local result = exports['coe_jobs']:TabletCall(playerId, appId, action, payload)This module registers no commands: it is driven by exports and events.