JCKSDocs
JCKS BridgeV2Dokumentacja techniczna

Configuration

The pages of /jcks and every option of settings/config.lua, including vehicle identity, licences and security.

The bridge is set up in game with /jcks. settings/config.lua holds the starting values for a fresh server. What you save in /jcks is stored in the database and wins over the file. Changes reach every player after saving. Only the system picks (Framework, Inventory, Target, Society, Keys, Phone, Mdt, Fuel, Clothing) restart jcks_bridge and the JCKS scripts, /jcks marks those fields with Restart.

Pages of /jcks

Page What it sets
Overview Things to do (missing systems, scripts waiting for setup, updates, security reports in the last 24 hours), the scripts on the server, the merge report after an update
Environment Framework, inventory, target and SQL driver
Integrations Company accounts, vehicle keys, phone, MDT, fuel, clothing
Providers Notifications, progress, skill check, prompt, menus and dialogs, per script overrides, see Providers
Vehicle identity Shown only when jcks_vehicles is installed
Access Admin groups, admin people, Discord roles and the permissions of every script, see Permissions
Server rules Unemployed job, language of game texts, security switches and limits, blocked models, debug output
Licences The licence settings below and the licences issued to each player
Appearance Themes, theme per script, reduce motion, interface size, window header and logo, player settings, see Themes
Interactions Mode, input, reach and hints of JCKS interactions, see Interactions
Keys Every jcks.keybind of every script. Admins press the new key, clashes are shown, the change reaches every player at once.
More from config Every other value of settings/config.lua and of jcks_lib, applied live. Reset goes back to the value in the file.
System Diagnostics, web panel, update check, secrets of other scripts, support bundle, server information, log forwarding and security reports
History Saved revisions with restore, Import from V1. Shown once the setup is saved.
Scripts One page per JCKS script or resource that registered settings: settings form, Open in script, Restart, first setup steps, access. The switch at the top stops or starts the script.

Restart, stop and start need add_ace resource.jcks_bridge command allow in server.cfg.

settings/config.lua

Systems

'auto' picks the first started resource. Write a value to force one. The lists are in Frameworks and systems.

Key Type Default What it changes
Debug boolean false Prints detection results and bridge calls to the server console
Framework string 'auto' qbx, esx, qb, ox, standalone, custom
Inventory string 'auto' ox_inventory, qb-inventory, framework, custom, or one of the other supported inventories
Target string 'auto' jcks, ox_target, tgiann-target, sleepless_interact, qb-target, qtarget, interact, none
Society string 'auto' A banking resource, esx_addonaccount, qb-banking, qb-management, custom. Without one the bridge uses internal.
Keys string 'auto' Vehicle key resource
Phone string 'auto' Phone resource, none sends messages as notifications
Mdt string 'auto' MDT resource, none turns warrant checks and the weapon registry for other scripts off
Fuel string 'auto' Fuel resource
Clothing string 'auto' Clothing resource, custom uses Editable.OpenWardrobe and Editable.RestoreCivilian

Look of prompts

Key Type Default What it changes
NotifyPosition string 'top-right' Default notification position
ProgressStyle string 'circle' circle or bar
TextUIPosition string 'left-center' Default prompt position

Players and admins

Key Type Default What it changes
AdminGroups table { 'admin', 'superadmin', 'god' } Framework groups or ACE groups that count as JCKS admins
AdminPeople table {} Extra admins by identifier, for example 'license:abc123', 'discord:123456789'
Unemployed string 'unemployed' Job players get when they are fired or a job is deleted
ItemImagePath string 'auto' Item images for all JCKS windows, %s is the item name. 'auto' uses the image folder of ox_inventory, qb-inventory, ps-inventory, lj-inventory, jaksam_inventory or tgiann-inventory (or the Images path of a custom inventory), '' shows no images.

Vehicle identity

Used by jcks_vehicles and the MDT.

Key Type Default What it changes
Identity.primary string 'uuid' uuid gives every vehicle a permanent id so plates can change, or vin, or plate
Identity.requireVin boolean true Every owned vehicle gets a VIN that police can read and criminals can scratch
Identity.plateFallback boolean true Vehicles bought before JCKS (no id yet) are still found by their plate

Licences

Key Type Default What it changes
Licenses.esxCompat boolean true Answers esx_license events and exports when esx_license is not running
Licenses.syncEsxLicense boolean true While esx_license runs, licences granted or removed through its events are copied into the bridge
Licenses.mirrorEsx boolean true ESX only, also writes every licence into user_licenses
Licenses.importEsx boolean true ESX only, imports existing user_licenses rows once on first start
Licenses.strictTypes boolean false true allows only the licence types listed in types
Licenses.viewJobs table { police = true, sheriff = true } Jobs that may look at someone's licences, on duty and within viewDistance
Licenses.viewDistance number 15.0 Meters a police officer may be from the person
Licenses.showDistance number 3.0 Meters for everyone else, showing your licence to someone next to you
Licenses.pointsLimit number 12 Penalty points that suspend a licence, 0 never suspends
Licenses.pointsSuspendDays number 7 Days a licence stays suspended after reaching the limit
Licenses.types table see below Label shown in windows and days of validity, no days means it never expires

Default licence types: drive (car, 30 days), drive_bike (motorcycle, 30), drive_truck (truck, 30), aircraft (60), boat (60), weapon (90), hunting (90), fishing (180), business (no expiry). Licenses.types is your own list: types you remove are not added back on update.

lua
Licenses = {
    pointsLimit = 12,       -- penalty points that suspend a licence, 0 = never
    types = {               -- label shown in UIs, days = validity (nil = never expires)
        drive = { label = 'Driving licence (car)', days = 30 },
        business = { label = 'Business licence' },
    },
},

Company accounts

Key Type Default What it changes
SocietyCompat.esx boolean true Only with internal accounts: answers esx_addonaccount and esx_society calls when those resources are not running
SocietyCompat.transactions boolean true Writes every company deposit and withdrawal into the transaction history
SocietyCompat.statements boolean true Adds a line to the player's personal bank history when a JCKS script takes or pays bank money with a reason. Renewed-Banking, qb-banking, tgg-banking and wasabi_banking.

Security

Every JCKS script reports suspicious actions here: invalid events, impossible distances, spoofed data. Each report has a weight. A player who collects kickThreshold points inside windowMs is kicked. Admins are never checked by the griefing guard.

Key Type Default What it changes
Security.windowMs number 120000 Time window for collecting points, ms
Security.kickThreshold number 6 Points inside the window that kick, 0 only reports and logs
Security.kickMessage string 'Disconnected: suspicious activity detected across JCKS resources.' Kick reason
Security.trapKick boolean true Fake events that only cheats send, for example jcks_bridge:server:addMoney, kick at once
Security.heartbeat.enabled boolean true Detects players who stopped a JCKS client script with a menu
Security.heartbeat.interval number 30 Seconds between checks
Security.heartbeat.misses number 3 Unanswered checks before a report
Security.heartbeat.maxPing number 400 Players above this ping are skipped
Security.heartbeat.kick boolean false true kicks instead of only reporting
Security.entityGuard.enabled boolean true Blocks props mod menus spawn to grief players
Security.entityGuard.models table 11 models Blocked models, for example prop_windmill_01, prop_ld_ferris_wheel, prop_gold_cont_01
Security.netGuard.enabled boolean true Filters game network events
Security.netGuard.explosions boolean true Limits explosions per player
Security.netGuard.explosionLimit number 8 Explosions allowed inside explosionWindow
Security.netGuard.explosionWindow number 3000 ms
Security.netGuard.blockInvisible boolean true Cancels invisible, silent explosions that still deal damage
Security.netGuard.entitySpam boolean true Limits script created entities per player
Security.netGuard.entityLimit number 60 Entities allowed inside entityWindow
Security.netGuard.entityWindow number 10000 ms
Security.netGuard.clearTasks boolean true Blocks clearing someone else's tasks (freezing or pulling a player out of a car)
Security.netGuard.weapons boolean true Blocks removing all weapons of another player. Giving or removing one weapon of another player is only logged.
Security.onKick function empty Called right before a kick with src, identifier, resource, reason, for example to ban with your anticheat

The five protections (integrity check, kick on a stopped resource, trap kick, troll prop guard, griefing guard) are switches in /jcks, Server rules, Security. /jcks, System shows what security caught since the start.

Other protections that need no setting:

  • The setup callbacks are admin only, rate limited, and refused attempts are reported.
  • Every JCKS resource guards its own state bags. A client write to a protected key (duty, restraints, vehicle ownership, tow state, car radio URL) is reverted and reported.
  • The admin flag jcks:admin is written by the server only.

editable/server.lua

Function When it runs Default
Editable.GiveKeys(src, vehicle, plate, opts) A JCKS resource hands out a vehicle Calls the detected keys resource
Editable.RemoveKeys(src, vehicle, plate, opts) A job vehicle is returned Calls the detected keys resource
Editable.Notify(src, data, resource) A server side notification Sends it to the client provider
Editable.IsAdmin(src) Every admin check false. Return true to grant access from your own staff system.

editable/client.lua

Function Default
Editable.Custom.* The custom provider, see Providers
Editable.SetClipboard(text) jcks_lib clipboard
Editable.OpenWardrobe() Outfit menu of the detected clothing resource
Editable.RestoreCivilian() Applies the saved skin of the character again
Editable.SetFuel(vehicle, fuel) / Editable.GetFuel(vehicle) Detected fuel resource plus the native fuel level

Example, okokNotify through the custom provider:

lua
function Editable.Custom.Notify(data)
    exports['okokNotify']:Alert(data.title or 'Info', data.description, data.duration or 5000, data.type or 'info')
end