> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-prison/features/the-prison-terminal.md).

# The Prison Terminal

The green-phosphor CRT corrections terminal — every page, every permission.

Guards reach the wall terminals in the booking office, gatehouse and admin offices by third eye, or by an `[E]` marker if you set `Config.Interact.computers = 'button'`. The interface is a **vintage all-in-one CRT** — dark beige case, green phosphor, scanlines and a typewriter boot sequence. Prefer amber? A one-block theme swap lives in `config/ui.lua`.

## Pages

Jump between pages with the **number keys 1–0** — numpad or the top row, whichever you reach for — or just click. `ESC` closes the terminal, `R` refreshes the current page.

| Key | Page          | What it does                                                                                                                                                                                                                                                     |
| --- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1   | **Dashboard** | Inmates on-site, medical/escaped counts, active lockdowns and riot state, current timetable slot, whether visitation is open, last head count — and the **officer roster**: every corrections officer online with their job, grade and duty state, on-duty first |
| 2   | **Inmates**   | Searchable database: number, name, cell, sentence (in months), conduct, current job, **live location**, status                                                                                                                                                   |
| 3   | **Cells**     | Occupancy grid — assign/move inmates, lock or unlock single cell gates. The DOOR column shows the gate's **effective** state, whether it is sealed by a lockdown, a riot, the timetable or an officer                                                            |
| C   | **CCTV**      | The camera network — watch live feeds, see which cameras are down                                                                                                                                                                                                |
| S   | **Solitary**  | Block 9B cell by cell — who's in it, gate state, when it was last opened, its camera and its log                                                                                                                                                                 |
| 4   | **Lockdown**  | Start/lift lockdowns per scope (prison, blocks, yard, medical, visitation)                                                                                                                                                                                       |
| 5   | **PA System** | One-click presets ("Meal time", "Visitation is now open"…) + free-text broadcasts with chime/alarm/buzzer tones                                                                                                                                                  |
| 6   | **Timetable** | The live schedule; enable/disable slots (grade-gated)                                                                                                                                                                                                            |
| 7   | **Headcount** | Begin a count, watch it live, review the last result with missing inmates highlighted                                                                                                                                                                            |
| 8   | **Records**   | The facility record stream — write-ups, incidents, visits, escapes, job completions                                                                                                                                                                              |
| 9   | **Logs**      | The **audit log**: every action with timestamp, actor, target and detail                                                                                                                                                                                         |
| 0   | **Emergency** | Full lockdown / cancel, medical emergency, escape alert, **riot alert / cancel riot**                                                                                                                                                                            |

{% hint style="warning" %}
**RIOT ALERT** seals every cell gate until an officer presses **CANCEL RIOT** (or `Config.Lockdown.riotAutoEndMinutes` elapses). It does not teleport anyone — see [Doors & Lockdowns](/mango5m-docs/resources/mango-prison/configuration/doors-and-lockdowns.md).
{% endhint %}

## CCTV

The **CCTV page** (key `C`) lists every installed camera with its name, model, the zone it watches and its status. **VIEW** hands the screen over to the live feed — a scripted camera at the lens with a CRT scanline look. Arrow keys switch between online cameras, `X` drops you back on the terminal. Opening a feed pulls the world in around that camera first (`Config.CCTV.streamLoadRadius` / `streamLoadMs`), so a wing on the far side of the prison renders properly instead of showing bare terrain. **REMOVE** is grade-gated like the other destructive actions.

Every camera physically exists in the world as a breakable prop. **Shoot one out and its feed goes dark** — the terminal shows `OFFLINE` with a countdown, on-duty guards get an alert, and service restores itself after `Config.CCTV.offlineMinutes` (10 by default).

### Placing cameras

Cameras are installed in game with a developer tool (`/prisoncam`), and the command is registered **server-side and ace-restricted** so only the people you grant it to can ever run it. Seven camera models ship, the aim can be swung independently of the housing, and the server refuses any camera outside the prison boundary.

That whole workflow — every key, every model, and every tuning value — lives on [**CCTV Cameras**](/mango5m-docs/resources/mango-prison/configuration/cctv-cameras.md).

## Solitary

The **Solitary page** (key `S`) is Block 9B at a glance: all seven cells with their occupant, time left, gate state, when that gate was last opened, and whether their camera is up. Select a cell for its full record:

* **Who's in it** — inmate number, name, time remaining, whether they're connected, and a jump straight to their file
* **The gate** — open or closed, with one-click control (`cells` grade). Opening stamps the "last opened" clock
* **Its camera** — see below
* **The cell log** — admissions, releases and every gate movement, with who did it

Solitary time is shown as **real minutes remaining** (`MM:SS`), not converted to the month scale sentences use — a stint in the hole is capped at `Config.Solitary.maxMinutes`.

The seven cells are `Config.Doors.solitary` (index = cell number), each paired with the spawn point at the same index in `Config.Locations.solitary`. A cell with no coordinate configured is flagged **NO COORDS**: it still lists and its gate still works, it just can't receive inmates.

### Solitary cameras

A camera named **`Solitary Cell 3`** (or `Solitary Cell #3`) belongs to cell 3. It is **hidden from the CCTV page** and appears on that cell's record instead, with its own VIEW button — and watching it shows only that cell rather than cycling the whole network. `X` returns you to the cell, not to the CCTV list.

Name matching is case-insensitive and tolerates a `#`; anything else (`Solitary Hall 3`, `Solitary Cell 3 North`) is treated as an ordinary camera and stays on the CCTV page.

## The inmate file

Opening an inmate shows their **booking photo** (when one was captured at intake) and full profile — status, cell, remaining sentence, conduct, live location, booking officer, charge, visitation status — plus their file history and the officer actions:

* **Move cell** — opens an arrow-key cell picker rather than asking you to type an id. `↑` `↓` move through the cells, `←` `→` jump between blocks, `ENTER` confirms, `ESC` cancels (clicking a row works too). Every cell shows its live occupancy — `EMPTY`, the inmate already in it, `CURRENT CELL`, and `[LOCKED]` — so you are choosing from what is actually free
* **Write-up** (reason required)
* **Solitary** (minutes) — while the inmate is already in the hole the same button reads **REMOVE FROM SOLITARY** and lets them straight out, back to their own cell. Early releases are logged separately from ordinary expiry
* **Lock down** — teleports that inmate into their own cell and locks the gate behind them. The button becomes **OPEN CELL** while the gate is locked, whether it was this officer, a lockdown, a riot or the timetable that shut it
* **End visitation** — only shown while that inmate is actually in a booth. Cuts the visit short: both sides go back where they came from, and the booth frees for whoever is next in the waiting room
* **Block / allow visits** — revoking requires a reason and is logged
* **+ / − time** — only if `Config.Guards.allowSentenceEdit = true` (off by default)

{% hint style="warning" %}
Every terminal action is validated **server-side**: guard job, per-action grade, *and* physical proximity to a real terminal. The NUI is a view, never an authority.

The one exception is the [development terminal](/mango5m-docs/resources/mango-prison/configuration/config-files-overview.md) (`Config.DevTerminal`), which bypasses all three — it ships **disabled** and must stay that way on a public server.
{% endhint %}

## The prisoner HUD

Inmates get their own panel, bottom-right: the **in-game clock**, their cell, inmate number, the current timetable slot, and a release countdown with a served-progress bar. Backspace minimises it to just the header (rebindable in **Settings → Key Bindings → FiveM**).

Anyone in solitary also gets a line under the bar — *"Released from solitary at 20:15"*. That time is on the **in-game clock**, like everything else players see. The HUD measures how fast this server's clock actually runs and projects the remaining real seconds onto it, so it stays right whether you run GTA's default 48-minute day, a retuned day length, or real-time sync.

The whole panel costs one small server callback per `Config.HUD.syncSeconds` (15 by default); the countdown ticks locally in between, and nothing runs at all for players who aren't imprisoned.

## The audit log

Every mutating action in the system lands in the Logs page and the `mango_prison_logs` table — jailings, releases, sentence changes, lockdowns, write-ups, solitary, visit bans, PA broadcasts, head counts, escapes, emergency alerts — each with who did it, to whom, and the detail.
