[FREE] EJJ's Prison | Activites | Prison Break | Crafting

EJJ Prison System

Hey everyone! I’ve been working on this prison script for a while and wanted to share it with the community. It’s way more than just your typical jail timeout - players can actually do stuff while they’re locked up.

GITHUB
PREVIEW

What makes this different?

Instead of just sitting around waiting for your sentence to end, players can:

  • Work prison jobs (cooking, electrical work, gym training) to reduce their time
  • Collect materials around the prison to craft escape tools
  • Dig tunnels to break out (with proper animations and everything)
  • Buy stuff from the prison shop if they need food/water

The escape system is pretty cool - you gather metal scraps, wood, and duct tape to make a shovel, then you can dig a tunnel. But if you get caught, alarms go off and dispatch gets notified. Makes for some really tense moments.

Prison Management:

  • Time-based sentences that persist through disconnects
  • Automatic inventory management (items removed/restored)
  • Police commands: /jail, /unjail, /jailstatus
  • Configurable locations and timers

Interactive Jobs:

  • Kitchen work with cooking minigames
  • Electrical repairs around the prison
  • Physical training/workout equipment
  • All jobs reduce your sentence time

Escape System:

  • Craft shovels from materials found around prison
  • Dig escape tunnels with realistic animations
  • Alarms trigger when you break out
  • Tunnels persist until reset by admins

Shop & Crafting:

  • Buy essentials from prison NPCs
  • Gather resources that respawn over time
  • Interactive crafting system

Technical Stuff:

  • Works with ESX Legacy, QBCore, and QBX
  • 8 languages supported (English, Danish, German, Spanish, Swedish, Japanese, Norwegian, Portuguese)
  • ox_lib integration for modern UI
  • MySQL database with auto-setup
  • Export functions for developers

Commands:

/jail [id] [time] - Jail someone (police only)
/unjail [id] - Release someone (police only)
/jailstatus [id] - Check jail time remaining
/resettunnel - Reset escape tunnel (admin only)

Installation:

  1. Extract to resources folder
  2. Add ‘ensure ejj_prison’ to server.cfg
  3. Configure settings in config.lua
  4. Restart server (database creates automatically)

Export Functions:

For developers who want to integrate this with other scripts:

Server:

  • exports[‘ejj_prison’]:JailPlayer(playerId, jailTime)
  • exports[‘ejj_prison’]:UnjailPlayer(playerId)

Client:

  • exports[‘ejj_prison’]:IsPlayerJailed()
  • exports[‘ejj_prison’]:GetJailTime()

Works great with police MDTs, court systems, and admin panels.

The script has been optimized for performance - no unnecessary loops or constant checks. Everything runs on events and the code is clean.

I’ve tried to make this as realistic as possible while still being fun. Players aren’t just stuck doing nothing, they have choices to make - work to reduce time safely, or risk everything for a chance at freedom.

Let me know what you think! Always open to feedback and suggestions.

SOME SCREENSHOTS





7 Likes

UPDATES

  • You can now enable a blip for the prison.

  • Config.KeepItemsOnJail has been added. Add item names that should remain with the player during imprisonment

  • Config.OfflineTimeServinghas been added.

2 Likes

Nice work.
Would be cool to be able to have a few digs to do. Like one out of the yard then dig one to go under the wall. Just a extra step and work. Prob have then need a getto pick axe of some sort too.

2 Likes

nice work :heart:

you need add Webhook Discord for Who is the officer that issued the command to imprison the citizen, and for how long? And what happens when the citizen is released from prison
It would be very nice

1 Like

Dope gonna try it ASAP

1 Like

Logs.lua has been added to server folder.

1 Like

Nice work, everything is functioning well! However, I’ve noticed that non-keep inventory items aren’t being removed when using the latest version of qb-inventory.

I also suggest removing the IsJailed check from the menu function and adding a “Request Release” button. This would allow players who’ve completed their sentence to request release and be teleported to the designated release point. It would be especially helpful for servers without DOC roleplay, so police officers don’t constantly need to check jail status or travel up to the prison to let the player out.

I appreciate your work

Thanks for the feedback! Just to clarify — players are already automatically unjailed once their sentence is complete. So there’s no need for a ‘Request Release’ button, unless the auto-release is bugging out or being skipped. Let me know if you’ve seen that happening.

server/bridge.lua has been updated to work with qb-inventory.

1 Like

I’ve been testing and editing the script for two days now. When a player’s jail sentence ends, they’re technically unjailed, but they remain inside the prison and lose access to the menu. Like most servers, I keep the prison doors and gates locked, so this becomes a problem :sweat_smile:. I’m not sure if the intention is for the doors and gates to be unlocked so the player can eventually realize they’re free and walk out the prison on their own, or if the function is just bugging out. I’m running the latest version of qbcore.

Could you create a ticket at the discord - EJJ Scripts

1 Like

Yes for sure, Thanks