> 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/configuration/items-and-commissary.md).

# Items & Commissary

Contraband handling, the prison scrip economy, commissary, cell stashes and visitor smuggling.

## Contraband on intake

Items in `Config.Items.illegal` (plus all weapons, if `weaponsAreContraband = true`) are classified as contraband when a player is jailed. What happens is set by `Config.Property.contraband`:

| Mode                 | Behaviour                                           |
| -------------------- | --------------------------------------------------- |
| `'hold'` *(default)* | Stored with everything else and returned on release |
| `'confiscate'`       | Moved to the prison evidence stash (ox\_inventory)  |
| `'delete'`           | Destroyed — logged in the property record           |

Everything else — items with metadata, weapons, cash, appearance — is snapshotted to the database and **returned on release**. Items that don't fit stay stored and are retried; nothing is ever lost.

## Prison scrip & the commissary

Jobs pay **prison scrip** (`Config.Items.scrip`, default item `prison_scrip`), spendable at the commissary target in the mess hall:

```lua
commissary = {
    enabled = true,
    items = {
        { item = 'sandwich',  label = 'Sandwich',      price = 2 },
        { item = 'water',     label = 'Water',         price = 1 },
        { item = 'coffee',    label = 'Coffee',        price = 2 },
        { item = 'cigarette', label = 'Cigarette',     price = 4 },
        { item = 'chocolate', label = 'Chocolate Bar', price = 3 },
    },
    trustyDiscount = 0.25,     -- % off for trusty inmates
},
```

Counters stand at each `Config.Items.commissary.locations` entry — third eye or an `[E]` marker, following `Config.Interact.commissary`. Walking up opens a **shop window**: what's on sale, the price at *your* rate, and your scrip balance.

Everything is decided server-side. It re-checks you are an inmate stood at a counter, that the line is on sale and that you can pay; the balance you see is always the one the server just returned, and if the goods don't fit the scrip is refunded. Trusties get `trustyDiscount` off, shown as a struck-through original price.

A shop line the inventory resource doesn't have can never be sold — the counter says which ones at boot rather than failing at the till.

## Meal items

Each recipe in the kitchen shift carries an `item` (`prison_spaghetti`, `prison_stew`, `prison_mac_cheese`, `prison_veg_soup` by default) that prisoners receive when they grab a serving from the pots on the counter at Lunch and Dinner. Like `prison_scrip`, these must exist in your inventory resource — the definitions are on the [Prison Jobs](/mango5m-docs/resources/mango-prison/configuration/prison-jobs.md) page.

## Cell stashes

With ox\_inventory, every cell gets a small **hiding spot** (5 slots by default). Prisoners can only open the stash in *their own* cell.

## Cell searches

Guards search any cell via target — but the stash doesn't just open. The officer plays a short **shakedown minigame** first, and one of five is picked **at random** each time, so a search never plays out the same way twice:

| Game                 | What you do                                                                                                                                                                 |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Shakedown grid**   | The cell's fixtures — bunk, locker, vent, toilet, mattress… — are laid out. You get three pulls. A miss reports **BURNING / WARM / COLD**, so it's deduction, not guesswork |
| **Contraband probe** | Stop a sweeping marker inside the target band. Three rounds, and the band shrinks each time                                                                                 |
| **Lock combination** | A sequence of keys flashes; repeat it on `1`–`4`                                                                                                                            |
| **Signal trace**     | A path lights up across a grid, then goes dark. Retrace it in order                                                                                                         |
| **Sweep and seize**  | Markers pop up one at a time — click each before it vanishes. Two misses allowed, and clicking empty space counts as one                                                    |

Pass and the stash opens; **anything on the contraband list is seized on the spot** — sent to the same evidence locker intake uses — and the occupant takes a behaviour hit and a write-up, with a guard alert naming the cell. Fail and you find nothing, and that officer can't re-toss that cell until the cooldown expires, so a botched search can't just be retried until it works.

While the panel is up the officer **turns to face the cell and rummages** — so anyone walking past sees a search in progress rather than someone standing frozen.

```lua
Config.CellSearch = {
    enabled  = true,
    games    = { 'sweep', 'timing', 'sequence', 'trace', 'reaction' },
    seconds  = 22,          -- time limit, whichever game comes up
    cooldown = 45,          -- before the same officer can re-search that cell
    notifyOccupant = true,  -- tell the inmate their cell was tossed, found or not
    behaviourHit   = 10,
    writeup        = true,
    toEvidence     = true,  -- false destroys what is seized instead

    anim = {                -- set to nil for no animation
        dict = 'amb@prop_human_bum_bin@idle_a',
        clip = 'idle_a',
        flag = 49,          -- looped, upper body only, player keeps control
    },
}
```

Every game has its own block under `Config.CellSearch.tuning` — grid size, round count, how fast the probe sweeps, how long the trace stays lit, and so on. Drop a name from `games` and it stops appearing in the rotation.

{% hint style="info" %}
The minigame decides whether the search *happens*, never what is found — the server resolves the stash contents itself, so a modified client can't conjure contraband or hide it.
{% endhint %}

{% hint style="warning" %}
Cell searches need ox\_inventory. On qb-inventory or a framework inventory there are no stashes to search, and the target falls back to doing nothing.
{% endhint %}

## Visitor whitelist & smuggling

Visitors' inventories are auto-stored in a secure locker at reception; items in `Config.Items.visitorWhitelist` (phone, ID, cash…) stay with them.

If **smuggling** is enabled, small items on the smuggle list get one skill check at the reception scanner:

* **Pass** — the item slips through and stays on the visitor
* **Fail** — guards get a scanner alert, the visit is logged, and the inmate takes a behaviour hit

{% hint style="info" %}
Smuggling + cell stashes + guard searches form a complete contraband loop: smuggle it in, stash it under the bunk, hope nobody tosses your cell.
{% endhint %}
