> For the complete documentation index, see [llms.txt](https://docs.hyper-code.eu/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-code.eu/documentation/clothing-stores/config.md).

# Clothing Stores – Configuration

All options in shared/config.lua of Clothing Stores: prices, markers, clothing bag, categories, shops, shop types, forbidden clothes and translations.

All settings are in `shared/config.lua`. This file is not escrowed.

## Notifications

```lua
Config.ShowNotification = function(source, message, title, type)
    if IsDuplicityVersion() then -- server side
        TriggerClientEvent("hc_notify:notify", source, message, title, type, 3000)
    else -- client side
        exports['hc_notify']:notify(message, title, type, 3000)
    end
end

Config.ShowHelpNotification = function(message)
    exports['hc_notify']:helpNotify(message, 'E', -1)
end
```

Replace the calls with your own notification resource if you do not use [Premium Notify](https://shop.hyper-code.eu/package/6496308).

## HUD

The HUD and the minimap are hidden while the shop is open.

```lua
Config.ShowHud = function(show)
    exports['hc_hud']:show(show)
end
```

Use the export of your HUD, or an empty function:

```lua
Config.ShowHud = function(show) end
```

## General

| Option                | Default                     | Description                                                                                      |
| --------------------- | --------------------------- | ------------------------------------------------------------------------------------------------ |
| `Config.GlobalPrice`  | `false`                     | One fixed price for every purchase, for example `250`. `false` = use the price of each category. |
| `Config.DrawDistance` | `100.0`                     | Distance at which the shop markers are drawn                                                     |
| `Config.MarkerSize`   | `x = 2.5, y = 2.5, z = 1.0` | Marker size. `x` is also the radius in which **E** opens the shop.                               |
| `Config.MarkerColor`  | `r = 254, g = 9, b = 67`    | Marker colour                                                                                    |
| `Config.MarkerType`   | `1`                         | Marker type                                                                                      |

Players pay with cash first. If the cash is not enough, the bank account is used.

## Clothing bag

| Option                      | Default         | Description                                                       |
| --------------------------- | --------------- | ----------------------------------------------------------------- |
| `Config.ClothingBagItem`    | `"clothingbag"` | Usable item that opens the saved outfits anywhere. `""` = no item |
| `Config.ClothingBagUseOnce` | `false`         | Remove the item after the player changed the outfit with it       |

## Categories

`Config.Categories` defines the categories in the shop, their icon and price.

```lua
Config.Categories = {
    {Name = "Head", Component = "helmet", Icon = "helmet.svg", Price = 50},
    {Name = "Mask", Component = "mask",   Icon = "mask.svg",   Price = 20},
    -- ...
}
```

| Field       | Description                                                               |
| ----------- | ------------------------------------------------------------------------- |
| `Name`      | Name shown in the UI                                                      |
| `Component` | skinchanger component without `_1` / `_2`                                 |
| `Icon`      | Icon file in `html/icons`                                                 |
| `Price`     | Price if this piece is changed (ignored when `Config.GlobalPrice` is set) |

Default categories and prices:

| Name     | Component   | Price |
| -------- | ----------- | ----- |
| Head     | `helmet`    | 50    |
| Mask     | `mask`      | 20    |
| Glasses  | `glasses`   | 290   |
| Neck     | `chain`     | 20    |
| Ears     | `ears`      | 95    |
| Bracelet | `bracelets` | 175   |
| Watches  | `watches`   | 200   |
| Arms     | `arms`      | 0     |
| Top      | `torso`     | 80    |
| T-Shirt  | `tshirt`    | 45    |
| Pants    | `pants`     | 90    |
| Shoes    | `shoes`     | 120   |
| Vest     | `bproof`    | 500   |
| Bag      | `bags`      | 200   |
| Decals   | `decals`    | 100   |

## Shops

```lua
Config.Shops = {
    {Position = vector3(72.254, -1399.102, 28.376), ShopType = 1},
    -- ...
    {Position = vector3(-1337.5859, -1277.5657, 3.8792), ShopType = 2}
}
```

| Field      | Description                  |
| ---------- | ---------------------------- |
| `Position` | `vector3` of the shop marker |
| `ShopType` | Key in `Config.ShopTypes`    |

The default config contains the 14 GTA clothing stores (type `1`) and one example mask shop at Vespucci Beach (type `2`).

## Shop types

```lua
Config.ShopTypes = {
    [1] = {
        Categories = {"helmet", "mask", "glasses", "chain", "ears", "bracelets", "watches", "arms", "torso", "tshirt", "pants", "shoes", "bproof", "bags", "decals"},
        BlipTitle = "Kleidungsladen",
        BlipSprite = 73,
        BlipSize = 0.8,
        BlipColor = 44
    },
    [2] = {
        Categories = {'mask'},
        BlipTitle = "Maskenladen",
        BlipSprite = 362,
        BlipSize = 0.8,
        BlipColor = 44
    }
}
```

| Field                                 | Description                                                     |
| ------------------------------------- | --------------------------------------------------------------- |
| `Categories`                          | Components (from `Config.Categories`) offered in this shop type |
| `BlipTitle`                           | Blip name                                                       |
| `BlipSprite`, `BlipSize`, `BlipColor` | Blip look                                                       |

{% hint style="info" %}
The default blip names are German ("Kleidungsladen" = clothing store, "Maskenladen" = mask shop). Change `BlipTitle` to your language.
{% endhint %}

## Forbidden clothes

Hide single clothes from the shop, for example job uniforms.

```lua
Config.ForbiddenClothes = {
    ["helmet"] = {
        ["2"] = {1, 2, 3}, -- helmet 2: hide textures 1, 2 and 3
        ["5"] = {-1}       -- helmet 5: hide completely
    },
    ["tshirt"] = {
        ["0"] = {-1},
        ["2"] = {-1}
    }
}
```

* Key: the component from `Config.Categories`.
* Inside: the drawable number **as a string**, and a list of textures to hide. `-1` hides the whole drawable.

{% hint style="warning" %}
Do not change the block marked `!! DONT CHANGE SOMETHING !!` below the shop types. It builds the marker zones from `Config.Shops`.
{% endhint %}

## Translations

`Config.Translation` contains every text in the UI and in notifications.

| Key                             | Default                                         |
| ------------------------------- | ----------------------------------------------- |
| `Headline`                      | `Clothing Store`                                |
| `Subheadline`                   | `Here you can buy new clothes or accessoires`   |
| `ClothingPiece`                 | `Clothing Piece`                                |
| `ClothingVariation`             | `Variation`                                     |
| `MyOutfits`                     | `My Outfits`                                    |
| `ButtonBuy`                     | `Buy Outfit`                                    |
| `ButtonSaveOutfit`              | `Save Outfit`                                   |
| `ControlHelp`                   | `Press Q and E to rotate your character.`       |
| `OutfitName`                    | `Name Outfit`                                   |
| `OutfitDelete`                  | `Delete Outfit`                                 |
| `OutfitDeleteMessage`           | `Are you sure you want to delete this outfit?`  |
| `ButtonSubmit` / `ButtonCancel` | `Confirm` / `Cancel`                            |
| `OutfitBuy`                     | `You have successfully purchased a new outfit!` |
| `ToShort`                       | `You must enter at least 3 characters!`         |
| `OutfitSaved`                   | `You have successfully saved your outfit!`      |
| `NotEnoughMoney`                | `You don't have enough money`                   |
| `HelpNotifyText`                | `Open clothing store`                           |
| `NotifyTitle`                   | `Clothing Store`                                |

## Colours

```lua
Config.Style = {
    LightColor = "#ff0040",
    DarkColor  = "#8a0022"
}
```

The two accent colours of the UI. No HTML or CSS knowledge needed.
