Cell Creator
Overview
NTeam Cell Creator is a FiveM resource for creating and managing prison cells directly in-game. The script provides:
creation of new cells through a menu or target interaction
storage of cell data in a MySQL database
definition of a polyzone area for each cell
prevention of leaving the cell by teleporting players back to the zone center
assigning and releasing prisoners
sentence timer display through NUI
a prisoner overview UI with mugshot images
support for ESX and QBCore
localization through JSON files
Dependencies
This resource uses the following dependencies:
ox_lib
oxmysql
ox_target (if
Config.EnableTarget = true)ESX or QBCore (optional in theory, but practically needed for job checks)
Required in server.cfg
server.cfgRecommended start order:
If you are not using ox_target, you can set:
Installation
Place the resource folder inside your
resourcesdirectory.Make sure
ox_libandoxmysqlare installed.Make sure you are using ESX or QBCore.
Add the resource to your
server.cfg:
Start the server.
On first startup, the script automatically creates the database table:
RestoreNeeds()
A client-side function called every minute while a player is jailed inside a cell that has restoreFood enabled.
You can add your own logic here to restore hunger and thirst.
Example for ESX-style integration:
Example using a custom export:
Commands
/cellcreator
/cellcreatorOpens the main menu for creating and managing cells.
Only players whose job is listed in Config.AllowedJobs can use this command.
Main Features
1. Creating a New Cell
From the New Cell menu, the following data is entered:
cell name
maximum prisoner count
whether food/thirst needs should be restored
whether the player should be teleported back when leaving the cell
After that, the zone is drawn manually.
Zone Drawing Controls
Arrow Up / Down / Left / Right — move the marker
Q — move marker up
CTRL — move marker down
E — add point
G — finish drawing
ESC — cancel creation
A valid cell requires at least 3 points.
After finishing the zone, the script asks you to place the target position by pressing E at the desired location.
Finally, the data is sent to the server and stored in the database.
2. Viewing Existing Cells
In the Cells section, all database cells are displayed.
For each cell, the following is shown:
current prisoner count
maximum capacity
whether exit teleport is enabled
whether needs restoration is enabled
3. Cell Management
Each cell provides these options:
Add Prisoner
Prisoners
Edit Cell
Delete Cell
Add Prisoner
The following is entered manually:
Player ID
Prisoner Name
Sentence (minutes)
The sentence is stored internally in seconds, so the minute value is multiplied by 60 before being sent to the server.
The script checks:
whether the cell exists
whether the cell has free space
whether the prisoner is already inside another cell
Prisoners
Displays the prisoner list for that cell and allows:
Release Prisoner
Edit Cell
You can change:
cell name
maximum prisoner count
restoreFoodteleportExitzone coordinates
During editing, the user can choose whether to redefine the zone coordinates.
Delete Cell
Permanently removes the cell from:
server memory
the MySQL database
active client zones and target zones
Last updated