> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/advanced-clothing/configuration/outfits-sharing-bags.md).

# Outfits, sharing and bags

Outfit limits, favourites, share codes, nearby sharing and outfit bags.

All settings on this page are in `config/config.lua`.

## Outfits and favourites

```lua
Config.Favorites = { enabled = true }
Config.Recents = { enabled = true, max = 30 }      -- kept client-side (NUI localStorage)

Config.MaxOutfits = 50
Config.MaxOutfitNameLength = 30
Config.MaxTagsLength = 60
```

| Option                    | Default       | What it does                                                                                 |
| ------------------------- | ------------- | -------------------------------------------------------------------------------------------- |
| `Favorites.enabled`       | `true`        | Favourite clothing items (**F** key, FAVORITES filter). Saved per character.                 |
| `Recents.enabled` / `max` | `true` / `30` | RECENT tab in the wardrobe with the last equipped outfits. Kept in the player's game client. |
| `MaxOutfits`              | `50`          | Saved outfits per character, imports and duplicates included.                                |
| `MaxOutfitNameLength`     | `30`          | Maximum outfit name length. `<`, `>` and control characters are refused.                     |
| `MaxTagsLength`           | `60`          | Total length of an outfit's tags (max 8 tags, 20 characters each).                           |

Saved outfits are stored in illenium's own `player_outfits` table, so outfits saved in illenium appear in Vision Clothing's wardrobe and the other way round.

## Sharing

```lua
Config.Sharing = {
    enabled = true,
    codeFormat = "XX-XXXX-XXXX",      -- X = random char from Constants.SHARE_CODE_ALPHABET; dashes/spaces are ignored on import
    persistentCodes = true,           -- true => the same outfit always resolves to the same code and never expires
    expiryHours = 24,                 -- used only when persistentCodes = false
    allowCurrentAppearance = true,    -- allow sharing the outfit currently worn without saving it first
    nearby = {
        enabled = true,
        radius = 10.0,                -- metres
        offerTimeout = 60,            -- seconds a received offer stays valid
    },
}
```

| Option                   | Default          | What it does                                                                                               |
| ------------------------ | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| `enabled`                | `true`           | Master switch for share codes, imports and nearby sends. `false` removes SHARE / IMPORT / SEND everywhere. |
| `codeFormat`             | `"XX-XXXX-XXXX"` | Layout of new codes. Each `X` is a random character. Change it only before players start sharing.          |
| `persistentCodes`        | `true`           | One permanent code per saved outfit. Sharing it again returns the same code.                               |
| `expiryHours`            | `24`             | Code lifetime when `persistentCodes = false`.                                                              |
| `allowCurrentAppearance` | `true`           | Share or send what you're wearing without saving it first.                                                 |
| `nearby.enabled`         | `true`           | SEND TO NEARBY PLAYER.                                                                                     |
| `nearby.radius`          | `10.0`           | Metres. Checked on the server when listing and when sending.                                               |
| `nearby.offerTimeout`    | `60`             | Seconds a received offer stays valid.                                                                      |

Good to know:

* Codes use `ABCDEFGHJKLMNPQRSTUVWXYZ23456789` (no `0`, `O`, `1` or `I`), so they can be read out loud without mistakes. Case, spaces and dashes don't matter when typing them.
* A code only carries **clothing** (no hair, face or tattoos) and never who made it.
* A code is a snapshot: editing the outfit later doesn't change what the code gives.
* Players can't import their own codes.
* **illenium's old outfit codes still work** in the IMPORT window.
* Outfits only fit the ped model they were made on (male, female or a custom ped). Importing always works; wearing needs the same model.
* Job, gang and boss-managed uniforms can't be shared or sent.

## Outfit bags

Portable wardrobes sold as ox\_inventory items. A player places a bag on the ground; the owner stores outfits in it and can pick it up again, and other players nearby can open it and wear what's inside. Needs **ox\_inventory** and **ox\_target**, plus the items from `install/ox_inventory_items.lua` (see [Installation](/visionstore-docs/scripts/advanced-clothing/installation.md)).

```lua
Config.OutfitBags = {
    enabled = true,              -- needs ox_inventory (items, shop) and ox_target (placed bag options)
    targetDistance = 2.0,
    useDistance = 3.0,
    placeDistance = 1.0,
    items = {
        outfit_bag_small = {
            label = "Small Outfit Bag",
            size = "small",
            capacity = 2,
            model = "prop_cs_heist_bag_02",
        },
        outfit_bag_medium = {
            label = "Medium Outfit Bag",
            size = "medium",
            capacity = 4,
            model = "prop_big_bag_01",
        },
        outfit_bag_large = {
            label = "Large Outfit Bag",
            size = "large",
            capacity = 8,
            model = "prop_ld_suitcase_01",
        },
    },
    shop = {
        enabled = true,
        name = "chapo_outfit_bags",        -- ox_inventory shop type
        icon = "fas fa-suitcase",
        stock = {                          -- shop slot order; $100, then +$50 for each bigger bag
            { item = "outfit_bag_small",  price = 100 },
            { item = "outfit_bag_medium", price = 150 },
            { item = "outfit_bag_large",  price = 200 },
        },
    },
}
```

| Option           | What it does                                                                                                                                                                                       |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled`        | Master switch for placing, opening and the bag shop.                                                                                                                                               |
| `targetDistance` | ox\_target distance of the options on a placed bag.                                                                                                                                                |
| `useDistance`    | Server-side maximum distance (metres) to open, use or pick up a bag.                                                                                                                               |
| `placeDistance`  | How far in front of the player the bag is placed.                                                                                                                                                  |
| `items`          | Item name → `label`, `size`, `capacity` (number of outfits) and prop `model`. Names must match your ox\_inventory items.                                                                           |
| `shop`           | An ox\_inventory shop added at every clothing store that has `coords` (option **Buy Outfit Bags**). Set `outfitBags = false` on a store entry to leave it out. `stock` lists the items and prices. |

Options on a placed bag:

| Option                                          | Who             |
| ----------------------------------------------- | --------------- |
| Open Bag                                        | Everyone nearby |
| Add Outfit · Manage Saved Outfits · Pick Up Bag | The owner only  |

Placed bags and their outfits are saved in the database and come back after a restart. Using a bag is free, and sharing and importing are off inside a bag.
