JCKSDocs
JCKS JobsV1Začínáme

Installation

Requirements, start order, items and admin access for JCKS Jobs 1.0.0.

Requirements

Resource Notes
FiveM server 7290 or newer with OneSync Listed in dependencies of the manifest
oxmysql Database driver
ox_lib Loaded through @ox_lib/init.lua
jcks_ui Loaded through @jcks_ui/import.lua, draws every window and menu
jcks_bridge 1.0.0 Detects framework, inventory, target, banking, keys, fuel and clothing
ESX Legacy 1.9+, QBCore or Qbox Detected by the bridge
ox_inventory or qb-inventory Recommended. Stashes, lockers and player search need one of them
ox_target, qb-target or tgiann-target Optional. Without one, markers and an [E] prompt are used

Start order

Start JCKS Jobs after the framework, the inventory, the target and the bridge.

cfg
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure ox_target

ensure jcks_ui
ensure jcks_bridge
ensure jcks_jobs

add_ace group.admin jcks_jobs.admin allow
add_principal identifier.license:YOUR_LICENSE group.admin

Use es_extended or qb-core instead of qbx_core on ESX or QBCore. add_ace allows the group.admin group to open /jobadmin, add_principal puts your account into that group. Your license is in txAdmin, Players. On Qbox and QBCore an admin flag in the database is not read, and the txAdmin menu has its own permissions. Only ACE in server.cfg counts.

Database

There is no SQL file to import. Every table is created and migrated when the resource starts. install/schema.sql is a reference copy of the schema.

Table Content
jcks_jobs Jobs
jcks_job_grades Grades, salaries, permissions
jcks_job_points Locations
jcks_job_members Multijob memberships on ESX and QBCore
jcks_job_activity Time on duty per character, job and day
jcks_job_transactions Company transactions
jcks_job_applications Job Center applications
jcks_job_logs Activity log
jcks_job_invoices Invoices and fines
jcks_job_settings Values changed in Server settings
jcks_job_config Values changed in Configuration
jcks_job_board, jcks_job_requests, jcks_job_records Job Hub board, employee requests, employee records
jcks_job_warrants, jcks_job_reports, jcks_job_evidence, jcks_job_mdt_logs, jcks_job_mdt_profiles MDT data
jcks_job_biometrics, jcks_job_firearms Forensics: fingerprints and DNA on file, firearms registry
jcks_job_jail Prisoners and remaining time
jcks_job_medical, jcks_job_medical_state Medical files and down state
jcks_job_wiretaps, jcks_job_wiretap_logs Wiretaps and intercepted records
jcks_job_plants, jcks_job_drug_tables Drug plants and placed tables

Company balances are kept by the banking resource the bridge detected. Without one they go to jcks_bridge_accounts.

Items

The install/ folder has ready files for every item JCKS Jobs uses: ox_inventory.lua (paste into ox_inventory/data/items.lua), qb-core-items.lua (paste into qb-core/shared/items.lua) and esx-items.sql (ESX default inventory).

Group Items
Restraints and evidence handcuffs, handcuff_key, zipties, evidence_bag
Medical defibrillator, firstaid, bandage, painkillers, burncream, splint, medicalbag
Drugs and benches weed_seed, coca_seed, weed_bud, coca_leaf, watering_can, fertilizer, liquid_fertilizer, rolling_paper, empty_bag, acetone, joint, weed_bag, cocaine, weed_table, coke_table, workbench, metalscrap, plastic, rubber, gunpowder, blueprint_ammo, repairkit, lockpick
Burger Shot template rawburgerpatty, veganburgerpatty, nuggets, potato, onion, tomato, lettuce, cheddar, burgerbun, cup, burgerpatty, bleeder, heartstopper, veganburger, fries, onionrings, friednuggets, ecola, sprunk

Restraint items for ox_inventory:

lua
['handcuffs'] = { label = 'Handcuffs', weight = 300, stack = true, close = true, consume = 0 },
['handcuff_key'] = { label = 'Handcuff key', weight = 20, stack = true, close = true, consume = 0 },
['zipties'] = { label = 'Zip ties', weight = 20, stack = true, close = true, consume = 0 },

Keep consume = 0. JCKS Jobs removes zip ties itself when they are really used.

ESX default inventory:

sql
INSERT INTO items (name, label, weight, rare, can_remove) VALUES
  ('handcuffs', 'Handcuffs', 1, 0, 1),
  ('handcuff_key', 'Handcuff key', 1, 0, 1),
  ('zipties', 'Zip ties', 1, 0, 1);

On the ESX default inventory weapons are not items, so add a normal item such as scissors to removeWith of zip ties.

Admin access

A player can open /jobadmin when one of these is true:

  • they have the ACE from Config.AdminAce (default jcks_jobs.admin),
  • their framework group is an admin group in the bridge setup (/jckssetup, Server rules, Admin groups),
  • their identifier is in ServerConfig.AdminIdentifiers (/jobadmin, Configuration, Private).

The convar from the old jobs resource still works: set jobs_admin_licenses "license:abc,license:def".

First start

While the jcks_jobs table is empty, JCKS Jobs imports every job the framework already has, with grades, salaries and boss flags:

Framework Read from Written back to
ESX jobs and job_grades the same tables, then ESX.RefreshJobs()
QBCore shared/jobs.lua QBCore.Shared.Jobs through AddJob / UpdateJob
Qbox the Qbox job config exports.qbx_core:CreateJob

From then on JCKS Jobs is the source of truth and every change in the studio is written to the framework, so other resources keep seeing normal framework jobs.

Coming from the old jobs resource

  1. Remove the old jobs resource from server.cfg. Keep its tables.
  2. Install jcks_bridge and jcks_jobs.
  3. On the first start the framework jobs are imported, and the old jobs_markers locations (stashes, boss menus, wardrobes) are imported as active locations. Check them once in the Locations tab of each job.
  4. Move the identifiers from jobs_admin_licenses to ServerConfig.AdminIdentifiers when convenient.