> 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/backpack-system/config.md).

# Backpack System – Configuration

All options in shared/config.lua of Backpack System: notifications, backpack items and weights, visible bag, bloodout 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
```

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

## Backpacks

```lua
Config.Backpacks = {
    { Item = "backpack_s", Weight = 5 },
    { Item = "backpack_m", Weight = 15 },
    { Item = "backpack_l", Weight = 25 },
}
```

| Field    | Description                                                                            |
| -------- | -------------------------------------------------------------------------------------- |
| `Item`   | Item name. Every entry becomes a usable item.                                          |
| `Weight` | Extra carry weight. It is added to `MaxWeight` from your ESX config, in the same unit. |

When a player uses a backpack item, the item is taken from the inventory and the max weight becomes `ESX MaxWeight + Weight`. Using the same backpack again shows a message; using a different one returns the old backpack to the inventory.

{% hint style="warning" %}
The database stores the **position** of the backpack in this list (1, 2, 3, …), not the item name. Add new backpacks at the end and do not reorder or remove entries on a live server, otherwise players get a different backpack.
{% endhint %}

## Bag on the player model

| Option                 | Default             | Description                                                                           |
| ---------------------- | ------------------- | ------------------------------------------------------------------------------------- |
| `Config.ShowBagOnBack` | `false`             | Put a bag on the player model when a backpack is equipped (and remove it on bloodout) |
| `Config.Bags`          | `82` / `0` for both | Bag clothing (`bags_1` / `bags_2`) for male and female                                |

```lua
Config.Bags = {
    male   = {BagId1 = 82, BagId2 = 0},
    female = {BagId1 = 82, BagId2 = 0}
}
```

The bag is set with `skinchanger` and saved with `esx_skin`.

## Bloodout

| Option                    | Default                      | Description                                                                                                                                       |
| ------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.BloodOutEvent`    | `"hc_death:server:bloodOut"` | Server event your death script triggers on bloodout. The player loses the equipped backpack and the max weight is reset. `false` = never lose it. |
| `Config.NotifyOnBloodOut` | `true`                       | Show a message when the backpack is lost                                                                                                          |

The event must be triggered from the client of the player who bled out (`TriggerServerEvent`), because the script uses the event `source`.

## Translations

`Config.Translation` contains every text:

| Key                | Default                                                           |
| ------------------ | ----------------------------------------------------------------- |
| `Backpack`         | `Backpack` (notification title)                                   |
| `AlreadyInUse`     | `You are already using this backpack.`                            |
| `ReplacedBackpack` | `You equipped a backpack, your previous one was returned to you.` |
| `UsedBackpack`     | `You equipped a backpack.`                                        |
| `LostBackpack`     | `You have lost your backpack.`                                    |
