> For the complete documentation index, see [llms.txt](https://striga.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://striga.gitbook.io/docs/striga-inventory/items-shops-and-stashes.md).

# Items, Shops & Stashes

Items, item life cycle, cash, shops, stashes, the world and admin commands.

## Items

**Items** come from your framework item list (`qb-core/shared/items.lua`). Add new items there, as you always did.

**Player items** stay where your framework saves them (QBCore: the `players` table). Nothing to move.

Stack size: `Config.DefaultMaxStack` (`1000`) for every item, or per item in `Config.MaxStack`. Unique items always stack to 1.

```lua
Config.MaxStack = {
    cash = 1000000000,
    weapon_pistol = 1,
}
```

### Images

Images are loaded from the `images/` folder of Striga Inventory. The file name is the item's `image` field, for example `water_bottle.png`.

{% hint style="info" %}
To add an image: put the `.png` in `striga-inventory/images/` and set the same name as `image` on the item.\
Images somewhere else? Change `Config.ImagePath` (`%s` = the image file name).
{% endhint %}

### Cash

**Cash** is the `cash` item (`Config.CashItem`). It stays in sync with the player's framework cash, both ways. The item must exist in your framework item list.

### Weapons

A weapon added without `serie` / `quality` gets a serial number and `quality = 100`. See [Weapons](/docs/striga-inventory/weapons.md).

***

## Item life cycle

All in `editable/config.lua`. The server works it out; players see it in the tooltip.

| Option           | What it does                                                                                                                                           |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Decay`          | Days until an item goes bad: `sandwich = 3`. Quality goes from 100 to 0 over that time. A bad item cannot be used (`DecayUseSpoiled = true` allows it) |
| `Uses`           | Uses per item: `lockpick = 5`. After 5 uses one lockpick is gone                                                                                       |
| `Bags`           | Items that open like a stash: `backpack = { slots = 15, maxWeight = 30000 }`. No bag inside a bag                                                      |
| `BackpackBonus`  | A **worn** backpack (clothing slot "bag") adds slots and weight: `{ slots = 10, maxWeight = 20000 }`                                                   |
| `Rarity`         | A color line under the item: `tiers` (colors) and `items` (`weapon_pistol = 'rare'`)                                                                   |
| `HiddenMetadata` | Metadata keys never shown in the tooltip                                                                                                               |

{% hint style="info" %}
Items you use in `Bags` must exist in your item list. A bag opens when the player **uses** it. One bag per slot: split a stack of bags first.
{% endhint %}

Taking a worn backpack off needs its extra slots empty and the weight to fit without it.

***

## Shops

File: `editable/shops.lua`

* `Shops.Account` = how players pay: `'cash'` or `'bank'`.
* `Shops.Products` = product lists. Each product: `name`, `price`, `amount` (stock), `requiredJob?`, `requiredLicense?`.
* `Shops.Locations` = the shops: `label`, `coords` (vector4), `ped?`, `scenario?`, `products`, `showblip`, `blipsprite`, `blipscale`, `blipcolor`, `type?` (`'weapon'` = gun shop), `requiredJob?`, `interactionDistance?`.

```lua
['247supermarket'] = {
    ['label'] = '24/7 Supermarket',
    ['coords'] = vector4(24.47, -1346.62, 29.5, 271.66),
    ['ped'] = 'mp_m_shopkeep_01',
    ['scenario'] = 'WORLD_HUMAN_STAND_MOBILE',
    ['products'] = Shops.Products['normal'],
    ['showblip'] = true,
    ['blipsprite'] = 52,
    ['blipscale'] = 0.6,
    ['blipcolor'] = 0,
},
```

`requiredLicense = 'weapon'` locks a product until the player has that licence.

Shop peds spawn when a player comes within `Config.PedSpawnDistance` (`30.0`). The `[E]` prompt shows within `Config.InteractionDistance` (`1.5`).

{% hint style="info" %}
Shops other scripts add (`RegisterShop`, qb `CreateShop`) open **only** from that script (`OpenShop`), so their own checks stay. Pass `interact = true` and `locations` to make one open with `E` too. See [Server exports](/docs/striga-inventory/exports-and-events/server.md).
{% endhint %}

***

## Placed stashes

File: `editable/stashes.lua`

```lua
{
    id = 'police_locker',
    label = 'Police locker',
    coords = vector3(453.075, -980.124, 30.889),
    owner = true,              -- every character gets its own copy
    groups = { police = 0 },   -- job = minimum grade (nil = everyone)
    slots = 50,
    maxWeight = 200000,
},
```

The police and EMS lockers are ready.

Stashes, trunks and gloveboxes are saved in the `striga_inventories` table every `Config.SaveInterval` minutes (`5`). Unused ones leave memory after `Config.EvictAfter` minutes (`15`).

### Trunks and gloveboxes

Size per vehicle type, class and model. See [Installation & Configuration](/docs/striga-inventory/installation-and-configuration.md#vehicles).

### Ground drops

Players drop items on the ground (or throw them) and hold `E` to pick them up again. An untouched drop stays `Config.DropLifetime` minutes (`15`). `Config.MaxDrops` limits drops per player (`20`) and on the server (`1000`).

***

## World

| Option      | Default | What it does                                                                                                        |
| ----------- | ------- | ------------------------------------------------------------------------------------------------------------------- |
| `Trash`     | on      | Trash bins and dumpsters (`Models`) open a shared bin. It empties `ClearMinutes` (`30`) after it was first opened   |
| `Vending`   | on      | Vending machines (`Models`) open a small shop with `Products`                                                       |
| `Carry`     | empty   | Items held in the hands while they are in the inventory: a prop everyone sees, a carry animation, no sprint or jump |
| `DeathDrop` | off     | On death, weapons (`Weapons`), cash (`Cash`) and the `Items` you list drop to the ground at the body                |

```lua
Config.Carry = {
    tv = { prop = 'prop_tv_flat_01', bone = 28422, pos = vector3(0.0, -0.28, -0.24), rot = vector3(0.0, 0.0, 0.0),
           anim = { dict = 'anim@heists@box_carry@', clip = 'idle', flag = 49 } },
}
```

***

## Admin commands

Set in `Config.Commands`. Only the ACE group in `restricted` (default `group.admin`) can use them. Set a command to `false` to turn it off.

| Command                                     | What it does                                                                                          |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `/giveitem <id> <item> [amount] [metadata]` | Give an item (metadata as JSON)                                                                       |
| `/removeitem <id> <item> [amount]`          | Remove an item                                                                                        |
| `/setitem <id> <item> <amount>`             | Set the total count of an item                                                                        |
| `/clearinv <id>`                            | Clear a player's inventory                                                                            |
| `/openinv <id>`                             | Look into a player's inventory (shows their character)                                                |
| `/openstash <name>`                         | Open a stash                                                                                          |
| `/clothesreset <id>`                        | Empty a character's clothing slots. They are read again from the character on the next inventory open |

Every command except `/openinv` and `/openstash` also works from the server console. The converter command is on [its own page](/docs/striga-inventory/converting-from-another-inventory.md).

{% content-ref url="/pages/j7jHu4zVH3HecQQnvpEf" %}
[Weapons](/docs/striga-inventory/weapons.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://striga.gitbook.io/docs/striga-inventory/items-shops-and-stashes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
