Analytics runs only if you accept. No names, codes or payment details are sent, and shopping works the same either way. Details: privacy and cookies.

  • Necessary Keeps your cart and this choice in your browser so the store works. We ask again after 12 months.
    Always on
  • Analytics (PostHog) Counts pages, clicks and store actions with your device type and rough location, and may record your visit with typed text hidden. Its cookie lasts 365 days. Data is stored in the EU.
    Off
  • Videos Product videos load from YouTube (Google) only when you press Play. YouTube may store data on your device. If you reject, Play opens the video on youtube.com in a new tab instead.
    When you press Play

With analytics on, the site keeps this visit's campaign source in this tab until you close it.

Change your choice any time with Cookie settings at the bottom of the page.

How to install FiveM scripts on your server

To install a FiveM script, download it, copy its folder into resources, import its SQL, add its items, and add an ensure line with its folder name to server.cfg, after the lines that start oxmysql, ox_lib and your framework. The example is our Advanced Jail System V2 (tk_jail) on ESX, QBCore or Qbox. It is protected by Cfx.re Asset Escrow, so its Portal and server key steps fit any escrowed script.

You need the server files, server.cfg and access to the database.

Before you start

  • A server that starts. ESX, QBCore or Qbox already runs. For a first server, follow Cfx.re’s server setup first.
  • oxmysql. Download oxmysql.zip from the oxmysql releases (2.14.3 on 19 October 2026). In server.cfg, set mysql_connection_string comes before any ensure line. If the password holds ; , / ? : @ & = + $ #, the oxmysql docs say to change it or try the other string format.
  • ox_lib. Download ox_lib.zip from the ox_lib releases (3.40.3 on 19 October 2026). The source code download must be built with bun before it runs; the release zip is ready.
  • The buying account and its key. An escrowed script runs only on a server whose sv_licenseKey comes from the Cfx.re account that owns the script. Tebex checkout signs you in with Cfx.re, so that is the account you bought with.
  • For tk_jail. The prison defaults to the Gabz Bolingbroke map, and the spots move to any MLO in config.lua. The script also supports ox_inventory, qb-inventory, qs-inventory and ox_target.
  • A database backup. Export the database before the SQL step. Restoring the export undoes the import.

Download the script from the Cfx.re Portal

  1. Sign in at portal.cfx.re with the account you used at checkout. Your scripts appear in your Cfx.re Portal account.
  2. Select Assets, then select the script under Granted Assets.
  3. Select Download and unzip the file. Find the tk_jail folder that has fxmanifest.lua directly inside it.

To go back to an earlier release later, open the script in Granted Assets, select … for its version list and download the version you want (Cfx.re article, edited 10 June 2026).

Copy the folder into resources

  1. Stop the server.
  2. Copy tk_jail into the resources folder of your server data. A folder in square brackets is a category, so resources/[tk]/tk_jail works too.
  3. Copy every file, including the .fxap file and hidden files. Some FTP programs skip hidden or protected files, and an escrowed script then fails to start.
  4. Keep the folder name tk_jail; it is the name your ensure line uses. If the zip unpacked as tk_jail/tk_jail, copy the inner folder, the one that holds fxmanifest.lua.

Import the SQL for your framework

tk_jail.sql holds two blocks. The block under -- ESX: adds columns to the ESX users table. The block under -- QB: adds them to players, the table QBCore and Qbox both use. Run only the block for your framework; the other one fails on a table you do not have.

  1. In your database tool, such as HeidiSQL or phpMyAdmin, open the database named in mysql_connection_string.
  2. Paste your framework’s block, from ALTER TABLE to the closing ;, and run it. The table gains jail_items, jail_time, jail_type and jail_cell, plus jail_cell_items on ESX.
  3. If the tool shows an error, stop and find it under “If it fails” before you run anything else.

Add the items

Every item a script gives or takes must exist in your inventory. tk_jail’s README.txt lists its 32 items in two formats, and its web/images folder holds a PNG for each.

  1. On ox_inventory (ESX or Qbox), paste the Items (ox_inventory) block into ox_inventory/data/items.lua, inside the table it returns. Copy the PNGs into ox_inventory/web/images.
  2. On QBCore, paste the Items (qb-inventory) block into qb-core/shared/items.lua, inside QBCore.Shared.Items. Copy the PNGs into qb-inventory/html/images.
  3. Search the file for each name before you save, and keep one entry per name. A paste outside the table stops the server with a Lua error in items.lua, so copy the file first and put the copy back if that happens.

On ESX without ox_inventory, items live in the database items table instead; adding items to ox_inventory, QBCore and ESX shows the rows and the weight scale.

Set config.lua

Escrow encrypts most of the script. In tk_jail these files stay open to edit: config.lua, locales/*.lua, client/frameworks/*.lua, server/frameworks/*.lua, client/main_editable.lua and server/main_editable.lua.

  1. Set Config.Framework = 'esx' on ESX, or 'qb' on QBCore and Qbox. Qbox runs QBCore scripts through its qb-core bridge, which its qbx:enableBridge setting turns on by default (Qbox docs).
  2. Set Config.Inventory to 'ox' for ox_inventory, 'quasar' for qs-inventory, or 'default' for the framework’s own inventory.
  3. Set Config.ImagePath. The shipped value is 'nui://ox_inventory/web/images'; on QBCore use 'nui://qb-inventory/html/images'.
  4. In Config.PoliceJobs, list the jobs and lowest grades allowed to jail, lock up, release and open the Prison MDT. The default is police from grade 0.

Add the ensure lines in order

ensure starts a script, or restarts it if it already runs, and server.cfg starts scripts in the order of its lines. A script must start after everything it loads. tk_jail’s manifest loads @ox_lib/init.lua and @mysql-async/lib/MySQL.lua, so oxmysql and ox_lib come first, then the framework and the inventory, then tk_jail. On Qbox the order is:

ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure tk_jail

On ESX, current esx_core’s server.cfg starts esx_lib, es_extended and then [core]; on QBCore, ensure qb-core and then ensure [qb]. A category line counts: if tk_jail sits in resources/[tk], the line ensure [tk] in that place starts it.

Do not add mysql-async. oxmysql declares provide 'mysql-async', so the @mysql-async/lib/MySQL.lua line loads from oxmysql, and the oxmysql docs say to delete mysql-async and ghmattimysql.

Check it works

  1. Start the server and read the console from the top. No error line names tk_jail, oxmysql or ox_lib.
  2. In game, as a character with the police job, type /jailmdt. The Prison MDT opens.
  3. As an admin, give yourself the tablet item: /giveitem 1 prison_mdt 1 on ox_inventory or qb-inventory, where 1 is your server ID. It shows in the inventory with its picture.

The next script goes in the same way, and its README names its own SQL and items; per-script answers are in the TK Scripts docs. If you are adding several of our scripts, compare the subscription plans before buying them one by one.

If it fails

Console or database line Cause Fix
Couldn't find resource tk_jail. The ensure name and the folder name differ, or fxmanifest.lua sits one folder deeper. Rename or flatten the folder, then restart. On a running server, refresh rescans resources before ensure tk_jail.
You lack the required entitlement to use [asset name] The server key belongs to a Cfx.re account that does not own the script. Follow you lack the required entitlement: use a key from the buying account, or transfer the script on the Portal.
Failed to verify protected resource [resource name] The upload skipped the .fxap file or a hidden file. Copy the whole folder again with a program that copies hidden files.
ox_lib must be started before this resource. ensure ox_lib is missing or comes after tk_jail. Put ensure ox_lib before the framework and tk_jail lines.
Unknown column 'jail_items' in 'field list', or another jail_ column The SQL block was not run on this database. Run your framework’s block on the database in mysql_connection_string.
Table 'fivem.players' doesn't exist, where fivem is your database You ran the -- QB: block on an ESX database. Run the -- ESX: block instead; ESX stores characters in users.
Duplicate column name 'jail_items' The block already ran once. Skip it; the columns are there.
attempt to call a nil value after an update A wrong Config.Framework, files from two versions mixed, or missing files. Install the folder fresh from the Portal, set the config again and clear the server cache and the client’s FiveM cache.
Props, vehicles or a map a script uses do not load The model needs a newer game build than the server enforces. Set sv_enforceGameBuild in server.cfg to the build the script or map names, such as sv_enforceGameBuild 3407. It applies only at startup.

The script in this guide

  • Prison sentences, group jobs, escapes and ankle monitors, run from a Prison MDT.

    Supports ESX, QBCore and Qbox

    Top 3 paid jail script on FiveM

    750+ servers (5Metrics, checked 11 October 2026)

    €19.99+ VAT at checkout, one-off

Server counts: 5Metrics, checked 11 October 2026. Detected servers running each script, rounded down.