Skip to content

Integrations ​

Every sibling except np_npchandler and np_prophandler (required) is optional and detected at start, with one status line each in the server and client console. Switch one off with Config.Integrations.<name> = false; its options are in Config.IntegrationOptions (shared/config/integrations.lua, see Configuration → Integrations). Siblings may also start or stop later: np_prison registers its providers and app again when they come back.

Sibling Side What np_prison does with it Without it
np_inventory server Items, metadata, use callbacks, stashes; the property bag is its ConfiscateInventory / ReturnInventory ox / qb / ESX inventory bridge
np_hud both Toasts, progress bars, prompts; claims its HUD zones while jailed Own toasts, progress bar and prompts
np_admin both Permission nodes np_prison.*, the settings page Prison, staff tools, the audit log (category np_prison) Own checks: admin groups, Config.Admins, Discord roles, jobs
np_discord server Admins and guards by Discord role; prison records in the log channel prison (convar discord_webhook_prison) Jobs, groups and Config.Admins; no Discord log
np_payments server Fines of an accepted charge sheet become invoices (payee: the police society); bail deposits, account top-ups, stamps and parcels are charged through Charge (category service) Framework money (Config.Booking.fine.accounts)
np_legal server BookLawyerVisit reserves a lawyer room slot after np_legal authorizes the visitor through legal.represent; prison enforces custody, facility and slot rules no legal visitor booking call
np_character both Spawn provider np_prison (a forced cell spawn while jailed); the own look saved with getAppearance before the jumpsuit and restored with setAppearance at release Ped components and a framework skin reload
np_tattoos both Jailed provider for prison ink (setJailedProvider); ink applied again after the jumpsuit and the own outfit np_tattoos' framework bridge decides who is jailed
np_identification server Warrant provider: bail no-shows and escapees are open warrants; optional weapon license suspension at booking (off by default) No warrants from np_prison
np_phone both The Corrections app, the sealed phone, voicemail notice, collect calls as a Live Activity /corrections as a screen; phones are not sealed
np_menu client Player and object options in np_menu's context menu while no target resource runs; a prison radial (sentence, job board, parole, letters; for guards the console) ox_target / qb-target / key prompts; no radial
MDT (np_mdt) server Siren, breakout and breach calls on the dispatch board (ReportCall, kind alarm), resolved when the facility is quiet again (ResolveCall) The other dispatch resources, toasts
np_helicam server Escapees in a vehicle during siren or manhunt: their plate on the BOLO list (AddBolo, rescanned every 20 s, RemoveBolo when quiet); police in a helicopter get a toast at the manhunt Nothing
np_gangs server No gang street actions or founding while jailed; members are told when one of theirs is booked or breaks out; the gang on the inmate record Nothing
np_drugs server Illegal products are contraband (property bag, searches, mail); no sales or production while jailed; drug test at intake (record, behaviour −5, optional court-ordered rehab) Contraband = np_prison's own lists only
np_minigames both Every skill check that pays is a server-validated np_minigames profile; the fence can be wires. See below np_prison's own ring; the client's word counts
np_screens server Boards show the facility's alert level (SetBoardMedia / ClearBoard); off until boards are listed Nothing
ox_target / qb-target client World options Key prompts (E)
cd_dispatch, ps-dispatch, qs-dispatch, core_dispatch server Breakout dispatch calls The generic event np_prison:dispatch and toasts
pma-voice, saltychat, yaca-voice server A private call channel for the visit handset and collect calls Proximity voice
np_doors, ox_doorlock, qb-doorlock server Cell doors at lockdown. np_doors comes first: a door's npdoors id is switched with setLocked, a door with only model and coordinates is created in np_doors once as np_prison_cell_<facility>_<i> (type cell, guard jobs as access). The guard key prison_guardkey can be an item rule or key lock type on np_doors doors (np_doors integrations) np_prophandler doors (Config.Routine.doors)
np_npchandler both Required (1.1.0+). NPC guards (server registerNpcs, setNpcEnabled while on duty, again on np_npchandler:ready), Sight post guards and the plug (client addLocalNpc, again on the client np_npchandler:ready; the plug's interact option only shows while you are jailed), the intake bus driver (createNetworkedPedInVehicle) Does not start
np_prophandler both Required (1.1.0+). Props held during progress bars (synced attach, detach), cell doors at lockdown without np_doors / ox_doorlock / qb-doorlock (registerDoor, setDoorLocked, again on np_prophandler:ready) Does not start

Minigames (np_minigames) ​

With np_minigames (1.1 or newer) running and Config.Minigames.enabled on (the default), the skill checks np_prison pays for are server-validated. At start the server registers one np_minigames profile per check, from the same configs as np_prison's own ring (same rounds, zones and speeds). The client plays the profile and sends the receipt instead of a success flag; the server redeems it after its own token, time and position checks. A client flag or a forged, used, expired or foreign receipt counts as a miss, and there is no shank without a won receipt.

Use (uses.<key>) What Profile
jobs Work detail task steps with rounds, including the cook's shrinking zone (one profile per zone size) np_prison:job_<job>_<step>[_z<zone>]
activities Workouts, yard games and classes with rounds act_<id>
dig Tunnel digging dig
fence Fence wire-cutting, one profile per layer fence_<layer> / fence_wires_<layer>
craft Workbench and cell recipes with skill (the shank) craft_<recipe>
lua
-- shared/config/minigames.lua
Config.Minigames = {
  enabled = true,
  uses = { jobs = true, activities = true, dig = true, fence = true, craft = true },  -- false: own ring for that use
  fence = 'skillcheck',                       -- or 'wires': np_minigames' wire cutting per layer
  fenceWires = { 'easy', 'medium', 'hard' },  -- wires difficulty per fence layer
  opts = { jobs = {}, activities = {}, dig = {}, fence = {}, craft = {} },  -- extra np_minigames opts per use,
                                              -- e.g. { allowMisses = 1 }, { maxMove = 2.0 }, { game = 'torque' }
  delegateSkillCheck = true,                  -- the SkillCheck export runs np_minigames' ring (client-judged)
}
  • SkillCheck for other resources plays np_minigames' ring while it runs (delegateSkillCheck). That ring is judged on the client, exactly like np_prison's own, so it is not server-validated.
  • In np_admin: Settings → Prison → Minigames (the switch and the fence game).
  • Without np_minigames, or with enabled = false, np_prison's own ring runs and the client's word counts, as before.

Notes ​

  • np_drugs: add np_prison to np_drugs' Config.TrustedResources so packed (concealed) products are recognised as contraband; without it only plain portion items are.
  • np_character only forces a spawn when it is the only one in the list. np_prison puts a relogging inmate back in the cell anyway. Downed and crash rejoins are decided by np_character.
  • np_payments invoices: the fine counts as charged at once (the invoice is the debt). If the booking fails after the fine, the invoice stays; cancel it in np_payments.
  • np_phone seals with setBlocked(src, true, 'jail'). Another resource's block with a different reason stays in place when np_prison lifts its own.

What other resources see ​

  • GetCriminalRecord(who): bookings, escapes, months, open warrants and the last record lines, for MDTs and ID checks.
  • The state bags jailed, prisonMonthsLeft, prisonFacility, prisonWanted, prisonWarrant and GlobalState.npPrisonAlert, readable without a call.
  • The events and hooks for logs, vetoes and follow-ups.