JCKSDocs
JCKS BridgeV2Bien démarrer

Installation

Start order in server.cfg, database tables, the first setup with the console code and the upgrade from V1.

server.cfg

Start the bridge after everything it talks to and before every other JCKS script. jcks_lib starts before the bridge.

cfg
ensure oxmysql

ensure qbx_core
ensure ox_inventory
ensure ox_target

ensure jcks_lib
ensure jcks_bridge
ensure jcks_jobs

add_ace resource.jcks_bridge command allow
Line Notes
qbx_core Or es_extended, qb-core, ox_core. Leave it out for standalone.
ox_inventory Or qb-inventory or another supported inventory, see Frameworks and systems. Without one, the framework inventory is used and stashes do not open.
ox_target Optional. Or tgiann-target, sleepless_interact, qb-target, qtarget, interact. With jcks_lib running, JCKS interactions are picked first in auto mode.
Banking, keys, phone, MDT, fuel, clothing Start them before the bridge as well
add_ace resource.jcks_bridge command allow Lets the setup restart, stop and start JCKS scripts by itself

On start the console prints one line with what was detected:

[jcks_bridge] v2.0.0 · framework qbx · inventory ox_inventory · target jcks · accounts Renewed-Banking · keys qbx_vehiclekeys · fuel ox_fuel · clothing illenium-appearance

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 them.

Table Content
jcks_bridge_settings The setup (key setup), V1 copy, import markers and backups
jcks_bridge_revisions Setup history with restore, the newest 200 are kept
jcks_bridge_setup_log Who saved the setup, the newest 50 saves are kept
jcks_bridge_setup_profiles Saved setup profiles
jcks_bridge_accounts Company balances when no banking resource is used (internal)
jcks_bridge_transactions Company deposits and withdrawals
jcks_bridge_jobdefs, jcks_bridge_profiles, jcks_owned_vehicles Standalone and custom core only: job definitions, character profiles with job and duty (standalone), owned vehicles
jcks_licenses Licences with expiry, suspension and points
jcks_vehicle_identity UUID, VIN and plate of every owned vehicle

First setup

Until the setup is saved, the JCKS scripts stay locked.

  1. Start the server. The console prints a six character code and the line to open the setup, for example /jcks K7MP2Q.
  2. Join and type that command. The code works once, only until the setup is saved. Whoever saves the setup becomes the first admin. Each player gets three tries a minute, every wrong code is reported, and after 20 wrong codes the console prints a new code.
  3. Pick the language, check Environment and Integrations, then save.

Players who already count as admins (see Permissions) open the setup with /jcks without a code. The setup opens with /jcks, /jckssetup, and /settings when no other resource registered that command. In the server console jcks prints the code again, or that the server is set up.

Folders and updating

Folder What it is On an update
settings/ settings/config.lua, the starting values of the setup Keep it
editable/ Hooks you can change (client.lua, server.lua, and client_framework.lua, server_framework.lua, client_inventory.lua, server_inventory.lua for a custom core or inventory) Keep it
defaults/ Untouched copies of both folders and of the locales. Never edit them. Upload it
everything else The script itself Upload it

Upload everything except settings/ and editable/ and restart. The console and /jcks, Overview list new settings, unused settings and missing editable functions. See Updates.

Upgrading from V1

  1. Upload V2 over the V1 folder and make sure jcks_lib is installed and started before the bridge. Replace ensure jcks_ui with ensure jcks_lib.
  2. Start the server. V2 finds the V1 files in the folder (shared/defaults.lua, client/editable.lua, server/editable.lua) and copies them into settings/config.lua, editable/client.lua and editable/server.lua once. Files you already changed in V2 are never overwritten.
  3. Restart once so the imported files load.

If the old version runs from another folder, V2 imports from there and stops it. Remove its folder and its ensure line afterwards.

Setup from the V1 database

V1 kept the setup in jcks_bridge_settings (key setup) and a copy in the server KVP jcks:setup. V2 uses the same place.

  • First start. When the saved setup is still from V1, the bridge converts it, saves it as V2 and prints a summary. The V1 style preset, mode and accent become a V2 theme. Branding admin and all becomes logo, none becomes text. The player rule for presets becomes the rule for themes. Systems, vehicle identity, UI positions, admin groups, security, licences, enabled scripts, script settings, language and the unemployed job are kept. Access by licence and Discord ID, interactions, providers and keys start with V2 defaults.
  • Later. /jcks, History, Import from V1 runs the same import again. Missing values are filled in. Values changed in V2 are listed with both values, Overwrite with V1 replaces them, Keep V2 values leaves them.
  • Source. The first V2 start stores the V1 setup as key v1 in jcks_bridge_settings. If the setup was saved in V2 before, the bridge takes V1 from the first revision (baseline) or the newest V1 row in jcks_bridge_setup_log.
  • Backup. The setup before the import is saved as key backup:import:v1 and as a revision. The import is revision import:v1 in History and can be restored. JCKS Logs gets an import_v1 entry.

Version check

After all resources started, the bridge reads https://jcksdev.xyz/fivem/versions.json and prints every JCKS resource with its version and whether an update is out. It repeats every 6 hours without printing. Admin windows show the same status. Turn it off with:

cfg
set jcks_version_check false