> For the complete documentation index, see [llms.txt](https://kox-core.gitbook.io/loot-box-2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kox-core.gitbook.io/loot-box-2.0/kox-core-or-loot-box-v2.md).

# KOX-Core | Loot Box v2

## Supported Frameworks

* [esx](https://github.com/esx-framework/esx-legacy)
* [*qb-core*](https://github.com/qbcore-framework/qb-core)
* **Custom**

## Supported Inventories

* [Aquiver Grid Inventory](https://freamee.github.io/util_resources/grid_inventory/About)
* [Aquiver Inventory v4](https://freamee.github.io/util_resources/inventory_4_0/About)
* [OX Inventory](https://overextended.dev/ox_inventory)
* [QB Inventory](https://www.google.com/url?sa=t\&rct=j\&q=\&esrc=s\&source=web\&cd=\&cad=rja\&uact=8\&ved=2ahUKEwji8tOhwJuCAxVjT6QEHcpLCzkQFnoECAoQAQ\&url=https%3A%2F%2Fdocs.qbcore.org%2Fqbcore-documentation%2Fqbcore-resources%2Fqb-inventory\&usg=AOvVaw3wzw2HhaSzm6PytxBqchJo\&opi=89978449)
* [AXFW's Inventory](https://axisge0.github.io/inventory/)
* [*QS Inventory*](https://docs.quasar-store.com/esx/inventory)
* [CodeM-Inventory](https://codem.gitbook.io/codem-documentation/m-series/minventory-remake/installation)
* **Custom**

## Supported API SQL

* [OX Mysql](https://overextended.dev/oxmysql)
* [Mysql-Async](https://brouznouf.github.io/fivem-mysql-async/)
* [GHmattimysql](https://github.com/FrazzIe/ghmattimysql)
* [Ice MySQL](https://iceclusters.github.io/docs/icMySQL/Installation)

## Supported Languages

* *English (en)*
* *French (fr)*
* *Spanish (es)*
* *German (de)*
* *Italian (it)*
* *Portuguese (pt)*
* *Russe (rus)*
* *Dutch (nl)*
* **Custom**

<figure><img src="/files/WpmkJEHLrQ4A3W6syqyT" alt=""><figcaption></figcaption></figure>

## 1) Installation of dependencies

* [ox\_lib](https://overextended.dev/ox_lib)

## 1.1) Import SQL file "coins.sql"

## 2) Translations

{% hint style="warning" %}
**We use the ox lib locale system.**

*If you don't want the script in English (default ox\_lib language), please follow this step to set the language.*
{% endhint %}

### &#x20;                                                ⤵️ Define your language ⤵️

<figure><img src="/files/0zWrJZTsaqbPCyuAJeTU" alt=""><figcaption><p>From : <a href="https://overextended.dev/ox_lib/Modules/Locale/Shared">https://overextended.dev/ox_lib/Modules/Locale/Shared</a></p></figcaption></figure>

### &#x20;                                                  ⤵️ Add a new language⤵️&#x20;

{% hint style="info" %}

* *Copy the `locales/en.json` file*
* *Create a file with your language name* **(identical to the one in server.cfg)**
  {% endhint %}

## 3) Global Config

Open the `shared/editable/global_config.lua` file.

### &#x20;                                                           ⤵️ Framework ⤵️

If you're using ESX/QBCore, the section below needs to be modified according to the one you're using.

<figure><img src="/files/wVoZ5160ttyoSryQXrUA" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
You can disable "Coins" to open crates, and open them with the crate item on your person.
{% endhint %}

### &#x20;                                                                             **⤵️⤵️**

<figure><img src="/files/Kd2EdqufB5sxtA7uHz27" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/74jOrbmVbassj7KNjaf4" alt=""><figcaption></figcaption></figure>

`↪️ server/editable/bridge`

### &#x20;                                         **⤵️ IF USE CUSTOM FRAMEWORK ⤵️**

{% hint style="warning" %}
Y**ou need to look at the file in `server/editable/bridge/other.lua` and modify it to suit your framework.**
{% endhint %}

### &#x20;                                                   ⤵️ Promo code creation ⤵️

To modify the command used to create codes :&#x20;

<figure><img src="/files/i74TADJWwloeWYyt2L0g" alt=""><figcaption></figcaption></figure>

Each group specified in this table will have access to the promo code creation command.

```lua
Config.AllowedGroups = {
    'superadmin', --ESX
    'admin', --ESX
    'god', --QBCore
}
```

### &#x20;                                                ⤵️ Discord webhooks setup ⤵️

Open the `server/editable/webhook_config.lua` file.

### &#x20;                                                               ⤵️ Interface ⤵️

You can also open it with a command and manage its activation.

<figure><img src="/files/HtnSb4filvgmWAthYnS1" alt=""><figcaption><p>To find out how to open it your own way : <a data-mention href="/pages/puoaf6WjfTscplJCcoXe">/pages/puoaf6WjfTscplJCcoXe</a></p></figcaption></figure>

## 4) Inventory

*The script is ready to run with certain inventories already defined.*

<figure><img src="/files/jahQw1AXKFH1VoEjKfyS" alt=""><figcaption><p><strong>The value of this variable must correspond to the name of the inventory script on your server !</strong></p></figcaption></figure>

### &#x20;                                                 ⤵️ Custom/Other Inventory ⤵️

{% hint style="info" %}

* Change the value of "Config.inventoryName" to nothing.

&#x20;   (Like this :**`Config.inventoryName = "" or Config.inventoryName = "custom")`**

* **Adapt file in** `server/editable/inventory/custom.lua`**.**
  {% endhint %}

## **5) Utils Custom**

{% hint style="info" %}
The script uses : &#x20;

* *A function to retrieve the type of vehicle won.*
* *A function to display the vehicle in order to retrieve its properties.*
* *A function to retrieve its properties.*

These are accessible in `client/editable/utils.lua`.

You can adapt them as you like, depending on how you work on your side.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kox-core.gitbook.io/loot-box-2.0/kox-core-or-loot-box-v2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
