PRISONJAILJAIL SCRIPTPOLICETUTORIALHOW-TODOORLOCKQBCOREESXQBOX October 25, 2026 · 10 min read

How to Set Up a Prison & Jail System in FiveM (2026)

Every server with police needs somewhere for an arrest to go. Most start with a jail script that teleports the player into the Bolingbroke yard and runs a countdown, and that’s exactly where prison RP dies. Nobody wants to stare at a timer, so inmates log off, and the cops who made the arrest never see the inside of the place.

A prison that actually creates RP needs more than a timer: a building, doors staff control, a reason for corrections officers to clock in, something for inmates to do, and a way out that isn’t just waiting. I’ve set up prisons on servers from scratch more than once, and there are three real ways to do it, from least effort to most complete. Here they are with the honest trade-offs.

What a FiveM Prison Actually Needs

Whatever route you take, these are the moving parts:

  • The sentence. Who can jail whom, for how long, and for what.
  • The place. An interior with cells, usually a prison MLO, or the vanilla Bolingbroke yard for basic setups.
  • The doors. Cell doors and gates that lock, controlled by staff, which means a doorlock resource.
  • The staff. A police or corrections job with access to the doors and the inmates.
  • Something to do. Prison jobs, an economy, contraband. Without it, inmates log off.
  • The way out. Release, parole, or an escape that’s hard enough to mean something.
  • Court, optionally. It turns an arrest into a scene for lawyers, judges and witnesses.

The three options below differ in how many of those you get and how much wiring you do yourself.

Option 1: Install a Free Jail Script (Fastest)

If you need jail to work this week, start with a free script:

  • qb-prison is QBCore’s own jail, built to work with qb-policejob, with prison jobs that take time off a sentence.
  • esx_jail is the community ESX jail. It’s simple, and it hasn’t been updated since 2023.
  • xt-prison is free and actively maintained, with support for QBCore, Qbox, ESX, ND and ox.
  • Pickle’s Prisons is a free release with breakouts, work and activities.

The flow is similar across them. An officer jails a player for a number of minutes, the player is moved to the prison, and when the time runs out they’re released. Install it like any resource, after your framework and its dependencies. How to install FiveM scripts covers that, then run any SQL it ships with and add whatever items it uses.

The honest downside: most free jail scripts are built around fixed coordinates, often the vanilla Bolingbroke yard. Putting one into a custom prison MLO means editing coordinates by hand, and court, parole and real staff tools mostly don’t exist. It works, but it’s a timer with a view.

Option 2: Build a Full Prison by Hand (The Manual Way)

This is how most serious prison RP servers did it until recently: a good MLO, a jail script, a doorlock resource, jobs and a lot of glue.

  1. Pick a prison MLO and install it. There are Bolingbroke interiors and county jail MLOs on Tebex. Our guide on adding custom MLOs to FiveM covers the install and the usual problems.
  2. Map the script to the building. Walk the interior and copy coordinates for every cell, the booking point, the release point and every job location into the script’s config. It usually looks something like this, times fifty:
Config.Cells = {
    vector4(1767.12, 2501.48, 45.74, 210.0),
    vector4(1764.37, 2499.80, 45.74, 210.0),
    -- ...one line per cell, copied in game
}
  1. Set up the doors. Add every cell door and gate to your doorlock resource, like ox_doorlock, authorise the right jobs, and group the doors you want to seal in a lockdown.
  2. Create the jobs. A corrections job, and a judge job if you want court. How to set up jobs on an ESX server covers the job side.
  3. Register the items. Prison currency, contraband, tools. How to add items in FiveM covers ox_inventory, QBCore and ESX.
  4. Glue it together. Dispatch alerts for breakouts, your MDT for records, and whatever court process you invent.
  5. Test with two people, one cop and one inmate. Fix the coordinates that drop people into walls, restart, and test again.

The cost isn’t money, it’s time. Coordinate hunting for a big interior takes evenings, the door config is long and easy to get wrong, and if you ever switch MLOs, you redo most of it. And even after all that, most jail scripts still have nothing for court, because it’s a lot of work to build.

When the manual route is the right call: if you have a developer, you want a very specific flow nobody sells, or you’re happy combining free scripts and maintaining the glue between them.

Option 3: Build the Prison In-Game

Full disclosure: this is our script, so weigh what follows with that in mind.

The LMX Prison Creator is $34.99 one-time, and the whole idea is that there isn’t a single coordinate in its config. You run /jailbuilder, walk your own interior, aim and press E. The builder has 20 catalog sections: cells, doors, processing, holding, guards, courtroom, visitation, activities, escape routes, contraband, NPCs, medical, transport, elevators, perimeter, seating and zones. It handles multiple floors, has a freecam and undo, and a Validate button lists anything that would break before you Save. Saves are versioned with automatic backups. That’s step 2 of the manual route, done by walking around.

Doors are the other big time sink it removes. Aim at any door in your MLO, press E, and it writes the ox_doorlock entry and authorises your corrections and police jobs on it. Double doors work. Each door gets a type: open for inmates, secure, sealed on lockdown, or visitation-only.

Then there’s everything a timer script doesn’t have:

  • Intake. /jail [id] [minutes] [reason] sends the player through transport, an arrival cutscene, booking, a mugshot, a fingerprint minigame, property storage, medical, classification and a uniform change. Everything they carried, cash included, is stored against their record and returned exactly on release.
  • Court. A judge terminal with a live docket, pleas with a discount for pleading guilty, juries of real players who vote independently, witnesses sworn in at the stand who testify over voice, perjury charges, four verdicts, appeals, and bail priced off the charges.
  • A CO duty tablet. Roster, visit approvals, remote control of every door you captured, lockdown, a headcount that names who’s missing, parole, and an audit log of every staff action.
  • Escapes that cost something. Five routes, each needing a real tool: a rope for the wall, a shovel for the tunnel, a screwdriver for the air duct, a crowbar for the sewer, and wire cutters for the fence. Fail the skill checks and you’re caught, put in solitary and stripped of your tools.
  • Parole and ankle monitors. Eligibility comes from time actually served, so logging off earns nothing. A board of staff votes, never the inmate, and parolees leave wearing a monitor you can track live, route to, or shock. Stray too far and parole revokes itself with a dispatch alert.
  • A prison economy. 12 paid jobs, commissary credits, cigarettes as the hard currency, a black-market dealer, crafting and contraband stashes.
  • Built-in dispatch, or it uses ps-dispatch, cd_dispatch, qs-dispatch, linden or rcore if you run one.

The database builds its own tables on first start, so there’s no SQL to import for the core script, and you can run as many prisons as you like. It ships with a pre-built layout for the Polo Cook County prison MLO to start from.

Where it falls short, honestly:

  • It’s not standalone. It needs ox_lib, oxmysql, ESX, QBCore or Qbox, an inventory (ox, qb, ps, qs or codem) and a target (ox_target or qb-target). ox_doorlock is recommended for door capture and lockdown.
  • You build before you jail. Until a prison is built and saved, /jail has nowhere to send anyone.
  • There are items to register: prison currency, escape tools, crafting materials and contraband. A feature whose item is missing simply never fires, with no error.
  • Parole needs two players online, because an inmate can never sit on their own board. Testing it solo fails, correctly.

Fair comparison: if you don’t need court, parole or an in-game builder, a free script from option 1 plus a decent MLO can be enough, and rcore sells a paid prison system with escapes and prison jobs if you’d rather compare.

Troubleshooting Common Prison Problems

Jailing a player does nothing. The prison has nowhere to send them: wrong coordinates, or with the LMX builder, no saved layout yet. Place at least a cell, a booking desk and an arrival point, then save, and run /jailstatus to see what the server loaded.

Doors won’t lock. The doorlock resource isn’t running, the door was never added to it, or the staff job isn’t authorised on it.

Inmates spawn inside walls or fall through the floor. Coordinates copied on the wrong floor, or the MLO’s collision isn’t loaded. Check the MLO works on its own first.

A feature silently does nothing. Almost always a missing item. Escape tools, recipes and rewards reference items by name, and if your inventory doesn’t know the item, the feature never fires.

Players log off to skip their sentence. Your script is counting real time instead of time served online. Pick one that only counts time served.

Items vanish on release. The script took the inventory without storing it against the player. Test release with a full inventory before you go live.

Prison Setup FAQ

Do I need a prison MLO? Not for a basic jail, which works in the vanilla Bolingbroke yard. For real prison RP with cells, visitation and staff areas, you want an interior.

Does it work on ESX, QBCore and Qbox? Most current prison scripts support all three through bridges. Check your inventory and target are supported too, because that’s where compatibility usually breaks.

Should corrections be its own job? On bigger servers, yes. A corrections job gives players a reason to be inside the prison when no cops are around, and it keeps the police on the streets.

Is court worth adding? If you have lawyers and judges, absolutely. A trial turns one arrest into a scene for half a dozen players. If you also run an MDT, our police MDT comparison covers how the big ones handle records.

Which One Should You Pick?

If you need jail working this week, install a free jail script, and browse our free scripts for other free resources to go with it. If you have a developer and want a bespoke flow, build it by hand around a good MLO and ox_doorlock. And if you want a prison that fits any MLO without a single coordinate, with intake, court, parole, escapes and a CO tablet built in, the LMX Prison Creator is what I’d install.

Setting up a prison and stuck on a step? Ask in our Discord with your framework, inventory and target.

YBN
YBN Limax Scripts
FiveM script developer at YBN. Building premium ESX, QBCore & Qbox resources.

Related Posts

Need scripts for your server?

Check out our premium FiveM resources — ESX, QBCore & Qbox supported.

Browse Premium Scripts → Free Scripts →