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. If you log in with Cfx.re, your visits count as one customer on each device where you accept, and your Cfx.re name is never sent.
    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, you download it, copy its folder into resources, import its SQL and add its items. Then you add an ensure line with its folder name to server.cfg, after the lines that start oxmysql, ox_lib and your framework.

We’ll use our Advanced Jail System V2 (tk_jail) on ESX, Qbox or QBCore as the example. It’s protected by Cfx.re Asset Escrow, so the Portal and server key steps work the same for any escrowed script. You’ll need the server files, server.cfg and access to the database.

Before you start

  • A server that starts. ESX, Qbox or QBCore is already running. If this is your first server, set it up first with Cfx.re’s server setup.
  • oxmysql. Download oxmysql.zip from the oxmysql releases (2.14.3 on 31 October 2026). In server.cfg, the set mysql_connection_string line goes before any ensure line. If your password contains any of ; , / ? : @ & = + $ #, 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.41.0 on 31 October 2026). The release zip is ready to run. The source code download has to be built with bun first.
  • The buying account and its key. An escrowed script only runs on a server whose sv_licenseKey comes from the Cfx.re account that owns it. Tebex checkout signs you in with Cfx.re, so that’s the account you bought with.
  • For tk_jail. The prison defaults to the Gabz Bolingbroke map, and you can move its spots 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. If something goes wrong, 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.

If you ever need an earlier release, open the script in Granted Assets, select … to see its versions and download the one 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 won’t start without them.
  4. Keep the folder name tk_jail, because your ensure line uses it. 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 has two blocks. The one under -- ESX: adds columns to the ESX users table. The one under -- QB: adds them to players, which Qbox and QBCore both use. Run only your framework’s block. The other one fails, because you don’t have its table.

  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 look it up under “If it fails” before you run anything else.

Add the items

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

  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. Before you save, search the file for each name and keep one entry per name. Copy the file before you paste. A paste outside the table stops the server with a Lua error in items.lua, and putting the copy back fixes it.

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, but in tk_jail these files stay open for you 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 Qbox and QBCore. 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. It ships as 'nui://ox_inventory/web/images'. On QBCore, use 'nui://qb-inventory/html/images'.
  4. In Config.PoliceJobs, list the jobs, with the lowest grade in each, that can jail, lock up, release and open the Prison MDT. By default that’s police from grade 0.

Add the ensure lines in order

ensure starts a script, or restarts it if it’s already running. server.cfg starts scripts in the order of its lines, and a script has to 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 that looks like this:

ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure tk_jail

On ESX, esx_core’s own server.cfg starts esx_lib, es_extended and then [core]. On QBCore it’s ensure qb-core and then ensure [qb]. A category line works too: if tk_jail sits in resources/[tk], an ensure [tk] line in that spot starts it.

Don’t add mysql-async. oxmysql declares provide 'mysql-async', so the @mysql-async/lib/MySQL.lua line loads from oxmysql. The oxmysql docs go further and say to delete mysql-async and ghmattimysql.

Check it works

  1. Start the server and read the console from the top. You shouldn’t see an error line that 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 up in your inventory with its picture.

Every other script goes in the same way, and its README names its own SQL and items. Answers for each script are in the TK Scripts docs. If you’re adding several of our scripts, compare the subscription plans before you buy 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 already 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, Qbox and QBCore

    Top 3 paid jail script on FiveM

    650+ servers (5Metrics, checked 11 November 2026)

    €19.99+ VAT at checkout, one-off

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

Spin for a discount code

Every spin gets a code; chance sets its size.

Cfx.re login and joining our newsletter are needed for your code.

Checking whether you can spin…

Odds for every spin
DiscountChanceMinimum order
15% off60%None
20% off28%None
25% off10%€30.00 + VAT
30% off2%€39.00 + VAT

Wheel codes work on scripts, bundles and a monthly plan's first payment, not on gift cards. One spin per Cfx.re account every 90 days. Each code is valid for 14 days and works once, with one code per order.