All products

np_prison

A prison where time inside is play time. A daily routine, jobs that take months off, a commissary, contraband, breakouts in several steps, visits and mail, and a console for the corrections officers. Sentences only count down while the inmate is online.

v0.1.0ESX · qbx · qb · standaloneRequires oxmysqlRequires np_npchandler 1.1.0+ · np_prophandler 1.1.0+
Price TBAStore link follows at release
InstallationDocumentation
Version
0.1.0
Frameworks
ESX, qbx, qb, standalone
Dependencies
oxmysql, np_npchandler 1.1.0+, np_prophandler 1.1.0+
Database
Tables created on start
Inventory
np_inventory, ox_inventory, qb-inventory, ESX
Facilities
Bolingbroke, Mission Row holding cells, Paleto Bay lockup
Optional
np_hud, np_phone, np_payments, np_character, np_admin, np_menu
Languages
English, German
Build
Node 18+ to build the NUI once
Book into custody at Mission Row: the suspect's mugshot and flags, charges from the penal code, modifiers, alternatives to prison, the facility, the security level and 92 months for $14,600
Book into custody at Mission Row: the suspect's mugshot and flags, charges from the penal code, modifiers, alternatives to prison, the facility, the security level and 92 months for $14,600

Taken from the NUI in the browser at 1920×1080.

What's in it

A core with sentences, inmates, cells, behaviour, an account and records, and 20 feature modules on top of it.

Sentencing

  • Charges from a penal code with modifiers, the facility, the security level and the fine.
  • The suspect answers the charge sheet: accept, ask for a lawyer or demand a trial.

Intake and release

  • Prison bus, mugshot, a pat-down into the property bag, the jumpsuit and the cell.
  • The release desk hands back the bag, the account and a release paper.

Routine and jobs

  • Roll calls, chow, work, yard, visits and lockdown on a prison clock.
  • Eight jobs take months off and pay into the account. Workouts and classes build skills.

Commissary

  • Weekly limits per item, paid from the inmate account.
  • Top-ups and care packages from outside, through the phone app.

Contraband

  • A plug who trades items, never cash, and moves around. Hiding spots in the cell and the yard.
  • Cell searches, pat-downs, shakedowns and bribes, each on the inmate's record.

Breakouts

  • Five routes, each a plan in several steps, alone or with a crew.
  • The alert ladder: quiet, suspicious, siren, manhunt. Escapees stay wanted.

Visits, mail and calls

  • Booked visits at booths with a handset, letters guards read, collect calls from wall phones.
  • The inmate's phone is sealed. A smuggled burner works until a guard finds it.

Guards

  • A console with the roster, a cell map, searches, solitary, mail review, parole and lockdown.
  • NPC guards run counts and shakedowns while no player guard is on duty.

A closer look

Sentencing and intake

Police, guards and admins open the sentencing screen on a cuffed player, with /jail or the client export. Months are roleplay months: 30 seconds of online time each by default.

  1. Charges: search the penal code, add modifiers like repeat offender or plea deal, pick the facility and the security level. The screen shows the months, the real time and the fine.
  2. Charge sheet: nothing applies until the suspect answers. Accept, request a lawyer (lawyers on duty are told) or demand a trial (judges are told). No answer in 60 s counts as accepted.
  3. Intake: the prison bus, a mugshot, a pat-down where small items may slip through, the property bag and the jumpsuit. The own outfit is kept for the release.
  4. Release: at the release desk the inmate collects the property bag, the account and a release paper item.

Every inmate has one public six-digit inmate number on the plate, the card, the bag, the HUD, the console and the phone app. Fines become np_payments invoices while it runs, otherwise they are charged through the framework.

Routine, jobs and activities

The inmate HUD shows the day, the months left, the account, behaviour and the current task. Guards' sight fills up on loud actions.

Job board with the kitchen shift selected: 4 months off, $18 to the account, behaviour +6 and 120 cooking XP, the shift steps and the skill check
PartWhat it does
RoutineCount, chow, work, yard, visits and lockdown. A missed roll call costs behaviour
JobsKitchen, laundry, cleaning, garden, plate shop, library cart, road crew and maintenance. Each shift takes months off, pays the account and feeds the prison's stock
Skill checkOne ring for every job and activity, with a twist per job
ActivitiesWorkouts, yard games, cards and dice at the tables, and classes that end in a certificate
SkillsXP and certificates stay on the character after release
TrusteesLast week's top workers get more areas and better jobs

Commissary and contraband

Cash taken at booking goes to the inmate account up to a cap. The rest stays in the property bag.

The plug: trust tier 2 of 4 and trades that turn collected items into a shovel, wire cutters, a burner phone or a soap key mould
  • Commissary: food, hygiene, stamps, phone cards and more, with weekly limits per item.
  • The plug trades items for tools, and only talks to inmates. Trust grows with each trade and opens more of them.
  • Hiding spots in the cell and a yard cache. Make a bed dummy, a poster or pruno.
  • Found on you: months added and solitary. Found hidden: the item is lost. Noise flags a block for the next shakedown.
  • Bribes: an officer who accepts skips the next search. Every offer is on the record.

Breakouts and the manhunt

Every route is a plan in several steps with tools from the plug, a time window and guards who can stop it. None of them is a single skill check.

RouteHow it goes
Cell tunnelDig from the cell over several sessions, cover the hole and leave a dummy for the night count. Up to 4 inmates
Yard fenceCut the fence layers between tower sweeps, at night
Laundry truckHide in a cart during the laundry shift's pickup
Staff gateA guard uniform and a copied key card
Outside jobFriends breach the wall from outside
Alert levelWhat happens
QuietNobody knows
SuspiciousGuards get a hint and a search prompt
SirenLockdown, doors sealed, police dispatch
ManhuntThe escapee is wanted. Plates go on the np_helicam BOLO list

Caught means booked again: extra months plus the months that were left, maximum security, back to the same facility. The bounty goes to the officer.

Visits, mail and the phone

The inmate's np_phone is sealed while jailed. Callers get a custody notice, and the inmate gets the list of missed callers at release.

Corrections app on np_phone: Marcus Bell in custody, 31 of 92 months served, with visit, top up, letter and package, visiting hours and the parole hearing
  • Corrections app: find an inmate, book a visit, top up the account, write a letter or send a package. Without np_phone, /corrections opens the same app as a screen.
  • Visits in the visiting periods, at booths with a handset on a private voice channel. Lawyers have their own room.
  • Letters cost a stamp and go out at mail call after a guard read them.
  • Collect calls from wall phones with phone cards ring as a Live Activity. A smuggled burner works too, until it's found.

Voice for handsets and calls: pma-voice, SaltyChat or YACA.

The guard console

At a control-room computer or with /prisonconsole. Guards are framework jobs, groups or Discord roles, no ACE.

Guard console mail review: three letters waiting, one flagged for contraband, a passage to black out, hold or approve
  • Roster and cell map with what every inmate does now, behaviour and months left.
  • Search a cell, pat down, add or reduce time, solitary, move cell, property bag and release.
  • Call a count, shake down a block, open the yard, allow visits and hold for a lockdown.
  • Mail review: approve, hold, seize or black out passages.
  • With no player guard on duty, NPC officers stand at the posts and run counts and shakedowns on a timer.

Parole and alternatives

Not every sentence has to end behind the walls.

Parole hearings: Marcus Bell with 48 of 92 months served and behaviour 78, the record, conditions such as no weapons and a curfew, and a 44-month parole period
OptionHow it works
ParoleThe hearing opens after a share of the sentence with enough behaviour. Guards, judges or admins decide, or the NPC board when nobody is on duty. A new booking during parole adds the months that were left
Community serviceTasks at city spots, each one takes months off. Leaving the zone adds tasks
Ankle monitorHouse arrest in online time. Leaving the zone adds months and alerts police
BailA deposit. Miss the court date and it is forfeited, with a warrant

Set it up

Compatibility

Every bridge is detected at start with one status line each. np_npchandler and np_prophandler are required, both 1.1.0 or newer. Every other integration is optional and can be switched off.

KindSupported
Frameworkes_extended (tested end to end), qbx_core, qb-core or standalone
Inventorynp_inventory, ox_inventory, qb-inventory or the ESX inventory
Targetox_target, qb-target or np_menu's context menu, key prompts without
Voicepma-voice, SaltyChat or YACA for visits and collect calls
Dispatchnp_mdt, cd_dispatch, ps-dispatch, qs-dispatch, core_dispatch or the np_prison:dispatch event
Drop-inpickle_prisons and esx_jail events, and the qb injail metadata
NP DEV resourceWhat np_prison does with it
np_paymentsFines become invoices. Bail, top-ups, stamps and parcels are charged through it
np_hudToasts, progress bars and prompts
np_phoneThe Corrections app, the sealed phone and collect calls
np_characterCell spawn while jailed, the own look saved and restored
np_tattoosPrison ink and ink kept through the jumpsuit
np_identificationEscapees and bail no-shows are open warrants
np_adminPermissions, a Prison settings page, staff tools and the audit log
np_helicamEscapee plates on the BOLO list during a manhunt

Installation

The tables are created on start. You build the NUI once and add the items for your inventory.

  1. Put the resource in resources/ as np_prison.
  2. Build the NUI once (Node 18+):
    cd web && npm install && npm run build
  3. Database: nothing to do with Config.AutoCreateTables = true. Otherwise import sql/install.sql and the module files in sql/.
  4. Items: np_inventory registers them on start. ESX: sql/items.sql. ox_inventory and qb-inventory: the lists in install/.
  5. Start it after its dependencies:
    ensure oxmysql
    ensure es_extended     # or qbx_core / qb-core (optional)
    ensure np_inventory    # optional, or ox_inventory / qb-inventory
    ensure np_hud          # optional
    ensure np_phone        # optional
    ensure np_payments     # optional
    ensure np_npchandler   # required, 1.1.0+
    ensure np_prophandler  # required, 1.1.0+
    ensure np_prison
  6. Set up facilities, jobs and the penal code in shared/config/. English or German with Config.Locale.

For your own scripts

Server exports, events, hooks that can veto or change a booking, and state bags any resource can read.

-- book a player for 40 months at Bolingbroke
local ok, view = exports.np_prison:JailPlayer(source, 40, 'bolingbroke', { reason = 'Armed robbery' })

-- read it anywhere without a call
if Player(source).state.jailed then
  print(Player(source).state.prisonMonthsLeft)
end

-- a hook: gang leaders always go to maximum security
exports.np_prison:registerHook('beforeJail', function(p)
  if isGangLeader(p.identifier) then return { security = 'maximum' } end
end)

-- an MDT reads the record
local record = exports.np_prison:GetCriminalRecord(citizenId)

Questions

Does the sentence run while the inmate is offline?

No. Months only count down while the inmate is on the server, so time inside is always played. One month is 30 seconds by default (Config.MonthSeconds).

Does it work without player guards?

Yes. NPC officers take the posts while no player guard is on duty, run roll calls and shakedowns on a timer and watch from the guard posts. They leave when a player clocks in.

I use pickle_prisons or esx_jail. Do my scripts still work?

np_prison listens to the pickle_prisons and esx_jail jail and unjail events and keeps the qb injail metadata in step, so scripts that send players to jail that way keep working.

Does it use ACE permissions?

No. Police, guards, judges and lawyers are framework jobs, staff come from framework admin groups, Config.Admins or, with np_discord, Discord roles. np_admin nodes work when np_admin runs.

Do I need the other NP DEV resources?

Two of them, both 1.1.0 or newer: np_npchandler for the NPC guards, the plug and the bus driver, np_prophandler for held props and cell doors. np_hud, np_phone, np_payments, np_character and the rest are used while they run, with a built-in fallback for each.

Is it in German?

English and German, for the Lua messages and the NUI, set with Config.Locale.

Works well with

Build once, ensure it, book your first inmate.

Configuration, every export, event and hook are in the docs.

np_prison docs