# Installation

## ⚙️ Installation & Requirements

Welcome to the installation guide for **0r-dispatch**! Please read this page carefully. If you skip steps or mess up the startup order, the script simply won't work. Let's get your dispatch system up and running! 🚀

***

### 📌 Requirements&#x20;

Before installing 0r-dispatch, your server **must** have the following resources. The script will not start without them:

* **ox\_lib**: The backbone library for modern FiveM servers.
* **0r\_lib**: Our core library provided with the script (Secured via FiveM Escrow).

**Supported Frameworks:** Good news! 0r-dispatch is highly optimized and works seamlessly with the most popular frameworks:

* **QBCore**
* **QBOX**
* **ESX**

***

### 🛠️ Installation Steps&#x20;

#### Step 1: Uploading the Files

1. Download the script files from your Keymaster.
2. Drag and drop the `0r-dispatch` and `0r_lib` folders into your server's `resources` folder.
3. Ensure you already have the latest version of `ox_lib` installed in your resources.

#### Step 2: The `server.cfg` Order (CRITICAL)

This is the most important part! The order in which you start your scripts in the `server.cfg` dictates whether the script will work or crash.

Your core framework (`qb-core`, `qbx_core`, or `es_extended`) **MUST** start first. Then `ox_lib`, and finally our scripts. Also, `0r_lib` **must** be placed immediately before `0r-dispatch`.

Open your `server.cfg` and ensure the startup order looks exactly like this:

```cfg
# 1. First, your core framework (Uncomment the one you use)
ensure qb-core
# ensure qbx_core
# ensure es_extended

# 2. Then, the dependencies
ensure ox_lib

# 3. Finally, 0R Studio scripts (Strict Order!)
ensure 0r_lib
ensure 0r-dispatch
```
