JCKSDocs
JCKS LibPierwsze kroki

Updating JCKS scripts

How to update jcks_lib, jcks_bridge, jcks_jobs and every other JCKS script without setting anything up again, what never to delete, the console messages and what to do when something goes wrong.

An update replaces the files of the script and keeps everything you set up. Your settings, your editable hooks and the data written in game stay where they are. On the first start of the new version every script tells you in the server console what changed and what it filled in for you. Nothing has to be configured again.

This page is the same for every JCKS script. Script specific notes: JCKS Bridge, JCKS Jobs.

Short version

  1. Back up the database and the folders of the scripts you update.
  2. Stop the server.
  3. Upload the new files of jcks_lib, then jcks_bridge, then the other JCKS scripts. Replace everything except settings/, editable/, live/ and the .json files the script wrote.
  4. Start the server and read the console.

Every release zip has an UPDATING.txt with the same steps.

What to replace and what to keep

Path On update
client/, server/, shared/, html/, imports/, update/, install/ Replace
live/ Keep. Live code the server owner wrote in game
fxmanifest.lua, CHANGELOG.md, README.md Replace
defaults/ Always replace. It holds the default settings, editable files and texts of this exact version. A defaults/ folder from another version makes the script report "defaults/ belongs to X".
locales/*.json Replace, unless you changed texts. If you keep your own files, texts added in the new version are taken from defaults/locales/ in English or in your language. The console lists them.
settings/*.lua, settings/server/*.lua Keep. New settings get their default value by themselves.
editable/*.lua Keep. New functions run their default code by themselves.
settings/*.json Never delete. Written in game: jobs, gigs, imported setups, update backups.
data/*.json Keep. Written by older versions, moved to settings/ on start.

Never upload settings/ or editable/ from the release over your own files. If you did, the console says that a file "matches the defaults again" and your previous version is in <file>.backup next to it.

Order

The scripts depend on each other: every JCKS script runs on jcks_lib and talks to the framework through jcks_bridge.

  1. jcks_lib
  2. jcks_bridge
  3. the others (jcks_jobs, jcks_vehicles, jcks_logs, jcks_hud and so on)

Keep this order in server.cfg too:

cfg
ensure oxmysql
ensure es_extended
ensure jcks_lib
ensure jcks_bridge
ensure jcks_jobs

Every version says which versions of jcks_lib and jcks_bridge it needs (Requires in the changelog). When you update only one script and it needs a newer jcks_lib or jcks_bridge, the console prints:

JCKS  jcks_jobs 2.0.1 needs newer JCKS resources and may not work until they are updated
    jcks_bridge 2.0.0 is installed, 2.0.1 or newer is needed
    Update in this order: jcks_lib, jcks_bridge, jcks_jobs, then restart the server.

What you see on the first start

Every script compares its version with the version it ran last time. On the first start after an update it prints one block:

JCKS  JCKS Jobs 2.0.1  update
  updated from 2.0.0 to 2.0.1
    2.0.1  2026-12-01  https://docs.jcksdev.xyz/changelog/jobs/#version-2-0-1
      + /jobadmin also works from the JCKS web panel.
      ~ Coordinates in the admin are editable: locations, spawns, teleports, blips and gigs.
  backup of 14 settings and editable files from 2.0.0: settings/update-backup-1.json (the last 5 updates are kept)
  settings/config.lua   2 new settings use their default values: Config.Taxi.extras, Config.Doors.labels
  editable/server.lua   missing ServerEditable.OnImpound, the default runs instead. Copy it from defaults/editable/server.lua or https://docs.jcksdev.xyz/jobs/v2/editable-defaults/#editable-server-lua
      ServerEditable.OnImpound: Impounds a vehicle for the "Impound" job action.

The same list is in /jcks, Overview and System, Updates, for admins with the Server setup permission. When nothing changed and nothing is missing, the script prints nothing.

Line What it means What to do
updated from X to Y First start of the new version, with the changes of every version in between Read Breaking and Upgrade steps
new settings use their default values Your settings file does not have these options yet Nothing. Copy them from defaults/settings/ only to change them
settings are no longer used Options in your file that this version does not read Delete them when you like
missing <function>, the default runs instead A new editable function that your editable/ file does not have Nothing. Copy it from the editable page of the script only to change it
new default entries were not added to your list New shops, recipes, zones and similar entries. Lists you own are never refilled Copy the entries you want from defaults/settings/
renamed X > Y, the value was moved An option got a new name, your value was kept Rename it in your file
texts are missing, the English text of this version is shown Your own locales/*.json misses new texts Copy them from defaults/locales/ and translate
file is missing, its defaults are used A settings file was deleted Copy it back from defaults/ to change it
matches the defaults again A settings file was overwritten with the release copy Your version is in <file>.backup, copy it back
defaults/ folder is missing The upload skipped defaults/ Upload defaults/ from the release
defaults/ belongs to X, the manifest says Y Half of the files are from another version, or the server did not reload the manifest Upload the whole release, run refresh, restart the server
downgraded from X to Y An older version started after a newer one See Going back

Editable functions of every version, in full: JCKS Bridge, JCKS Jobs, and the V1 files for Bridge and Jobs.

Version check

jcks_bridge asks the JCKS version server after every start and every 6 hours. When a script is behind, the console lists each missing version, newest first, with its date, the most important changes, Breaking and Upgrade steps and a link to its changelog:

JCKS  version check
  jcks_bridge       2.0.1     up to date
  jcks_jobs         2.0.0     2.0.3 is out (2026-12-20), 3 versions behind
                                2.0.3  2026-12-20  https://docs.jcksdev.xyz/changelog/jobs/#version-2-0-3
                                  breaking /panic moved to /jobs panic, rebind it in /jcks, Keys.
                                  upgrade  Restart jcks_bridge after jcks_jobs once.
                                  + Gig contracts per crew.
                                2.0.2  2026-12-10  https://docs.jcksdev.xyz/changelog/jobs/#version-2-0-2
                                  fix Taxi meter kept running after leaving the car.
                                and 1 older version, see https://docs.jcksdev.xyz/changelog/jobs/
  1 update waiting. Download in the Cfx portal: https://portal.cfx.re/assets/granted-assets
  Update jcks_lib first, then jcks_bridge, then the others. Keep settings/ and editable/.
  • When the version server cannot be reached right after the start, the bridge tries again after 15 seconds, 1 minute and 5 minutes. After that it shows the last answer it got and says from when it is.
  • Admins with Server setup get one notification per new version when they join. Players never see it.
  • Turn the check off in /jcks, System, Updates, or with set jcks_version_check false in server.cfg. The checks of the local installation (scripts running twice, a missing jcks_lib, too old versions) still run.

Backups

Before the first start of a new version every script writes settings/update-backup-<n>.json with all its settings files, editable files and the JSON data in settings/. The newest five are kept, the sixth update overwrites the oldest. Each file says which version it came from (from), the new version (to) and the date.

To restore a file, open the backup, copy the text of the file you need from files and save it under its path. The database is not part of it: dump it yourself before every update (txAdmin, HeidiSQL or mysqldump).

Going back

Going back to an older version is not supported once the newer version started. Database tables and settings/*.json may already have new columns or a new layout, and the old version does not know them. The console then prints downgraded from X to Y on every start.

To go back, restore the database dump and the backup from before the update, then upload the old version. To go forward again, simply upload the newer version again.

Special cases

jcks_ui is now jcks_lib. jcks_lib replaces jcks_ui and keeps provide 'jcks_ui', so older scripts that depend on jcks_ui still start. Remove the jcks_ui folder and its ensure line. When jcks_ui still runs, jcks_lib stops it and the console and the version check say so.

A script runs twice. Two folders with the same script (jcks_jobs and jcks_jobs-old, or a copy in another [category]) are reported by the version check. Keep one, remove the other folder and its ensure line. Two copies register the same commands, events and database jobs twice.

Renamed folder. The scripts read their name from fxmanifest.lua, so the version check still works. A renamed folder starts with an empty update memory: the first start does not show "updated from" and other scripts that call it by name (exports.jcks_jobs) stop working. Keep the original folder names.

Only one script updated. Allowed as long as the Requires versions are met. The console names the script that is too old.

Update while the server runs. Do not replace files of a running script. restart <script> after an upload keeps the old fxmanifest.lua in memory until refresh, and restarting jcks_lib or jcks_bridge stops every JCKS script that depends on them. Stop the server, upload, start it again.

txAdmin. Stop the server in txAdmin, upload with the file manager or FTP, then start it again. A scheduled restart is enough, as long as the upload is finished before it. Do not let txAdmin restart a single JCKS resource during the upload.

Escrow (Keymaster) versions. Download the new version in the Cfx portal (Granted assets). The escrow files only run with their own .fxap file, so always replace the whole folder except settings/, editable/ and settings/*.json. Settings, editable files, defaults and texts stay readable in escrow builds.

Changed commands and keys. A new version may rename a command or a default key. This is always in Breaking of the changelog. Keys players bound themselves stay bound. Commands you changed in the settings keep your name.

Deleted settings. A deleted settings file or option uses its default value and the console says so. Nothing breaks, but you lose what you had set there. The backup has the old file.

Texts. Texts you changed in locales/*.json stay yours. New texts appear in English (or in the language of the release) until you add them. An invalid JSON file is reported and the texts of the release are used instead.

For developers

A JCKS resource opts into all of this through its manifest and the update scripts of jcks_lib (see Settings folders and updates):

Manifest key What it does
jcks_requires 'jcks_lib >= 1.0.0' Lowest version of another resource. Checked by jcks_lib at start and by the bridge version check. One line per dependency.
jcks_docs 'https://docs.jcksdev.xyz/jobs/v2' Base of the docs links printed in the console
jcks_data 'settings/config.json' Data file to include in the update backup, for servers that cannot list folders

The changelog of a resource is its CHANGELOG.md, read by the console report and published as versions.json for the version check:

md
Requires: jcks_lib 1.1.0, jcks_bridge 2.1.0

- What works differently and needs action.

- What to do when updating to this version.

- New things, most important first.

- ...

- ...

A version without a date is not released yet. The first lines of Breaking and Upgrade steps, then of Added, Improved and Fixed, are the ones the console shows, so keep the most important line on top.