> For the complete documentation index, see [llms.txt](https://tru-development.gitbook.io/tru-development-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tru-development.gitbook.io/tru-development-docs/tru-outfitbag/installation.md). Agents can also search and read this documentation through its [MCP server](https://tru-development.gitbook.io/tru-development-docs/~gitbook/mcp).

# Installation

Documentation / Tru-Outfitbag

## Installation

Install Tru-Outfitbag on a development server first. The following instructions apply to the supplied build.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Framework: QBCore, Qbox, ESX, standalone.
* Dependencies: Matching inventory and clothing bridge.
* Access to `server.cfg` and `config.lua`.

### Installation steps <a href="#installation-steps" id="installation-steps"></a>

1. Extract as `Tru-Outfitbag`.
2. This build loads JSON storage for outfit persistence; do not rely on SQL for outfit persistence.
3. Install the matching item snippet from `install/items/` (`ox_inventory.lua`, `qb-core.lua` or `esx.sql`).
4. Copy `install/item_images/tru_outfitbag.png` into your inventory images.
5. Configure framework, inventory and clothing before starting.

```cfg
ensure Tru-Outfitbag
```

### ox\_inventory item <a href="#ox-inventory-item" id="ox-inventory-item"></a>

```lua
['tru_outfitbag'] = {
    label = 'Outfit Bag',
    weight = 4000,
    stack = true,
    close = true,
    consume = 0,
    server = {
        export = 'Tru-Outfitbag.UseBag'
    }
},

```

### Verify your installation <a href="#verify-your-installation" id="verify-your-installation"></a>

After starting the resource, check the server console for missing dependencies or script errors. Place a bag, save an outfit, change clothing, restore the outfit and pick up the bag. Reconnect and verify persistence.

> Test private access with a second player before enabling public sharing. Check clothing on the same ped model used to save it.

Continue to [Configuration](https://tru-development.gitbook.io/tru-development-docs/tru-outfitbag/configuration.md).

### Production rollout <a href="#production-rollout" id="production-rollout"></a>

Once the initial test passes, repeat it with a second player where the feature involves shared state. Check the behavior after reconnecting and after a resource restart. Keep a backup of the previous server configuration and avoid deploying during peak player activity.

### Preparing inventory and storage <a href="#preparing-inventory-and-storage" id="preparing-inventory-and-storage"></a>

Install the item definition for your actual inventory and ensure its image filename matches the supplied image. The supplied build uses JSON outfit storage; preserve data/outfits.json when replacing the resource. Test the clothing bridge using the same ped model and clothing pack before testing shared outfits. If you use target interaction, start the selected target resource before the bag.
