> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_mdt/integrations/framework.md).

# Framework

`rcore_mdt` supports ESX, QBCore, QBX, and Standalone.

## 🧰 Setup

The framework is not detected automatically. Set it in `configs/sh_config.lua`.

{% tabs %}
{% tab title="ESX" %}

```lua
CONFIG.Framework = Framework.ESX
```

Civilians are read from the `users` table and vehicles from `owned_vehicles`.

Members can use the MDT while they have the department job.
{% endtab %}

{% tab title="QBCore" %}

```lua
CONFIG.Framework = Framework.QBCore
```

Civilians are read from the `players` table and vehicles from `player_vehicles`.

Members must be on duty to use the MDT.
{% endtab %}

{% tab title="QBX" %}

```lua
CONFIG.Framework = Framework.QBox
```

QBX runs through the qb-core compatibility layer of `qbx_core`. Civilians are read from the `players` table and vehicles from `player_vehicles`.

Members must be on duty to use the MDT.
{% endtab %}

{% tab title="Standalone" %}

```lua
CONFIG.Framework = Framework.Standalone
```

Standalone needs you to connect your own player data. Complete the functions in `loadStandalone()` in both bridge files:

* `client/api/framework.lua`
* `server/api/framework.lua`

Until they are completed, players have no job and the MDT stays closed.
{% endtab %}
{% endtabs %}

## 🧩 Standalone Bridge

The server bridge must provide:

| Function                                  | Returns                                   |
| ----------------------------------------- | ----------------------------------------- |
| `GetPlayerFromId(source)`                 | A player object. See the list below.      |
| `GetPlayerByLicense(identifier)`          | The player's server ID, or `nil`.         |
| `FetchUsers()`                            | All civilians for the profiles list.      |
| `SearchUsers(query)`                      | Civilians matching a name. Up to 50 rows. |
| `GetVehicleByPlate(plate)`                | Owner and model of one vehicle.           |
| `SearchVehicles(query, mode, wantedOnly)` | Vehicle search results.                   |
| `GetVehiclesByPlates(plates)`             | Owners for several plates at once.        |

The player object returned by `GetPlayerFromId` must provide:

| Field or function                             | Returns                          |
| --------------------------------------------- | -------------------------------- |
| `identifier` / `getIdentifier()`              | Stable player identifier.        |
| `getName()`                                   | First and last name.             |
| `getSurname()`                                | Last name.                       |
| `getJob()`                                    | Job name.                        |
| `getRank()`                                   | Grade number and grade label.    |
| `getMoney()`, `addMoney(n)`, `removeMoney(n)` | Cash functions.                  |
| `HasItem(item)`                               | Whether the player has the item. |

When a player gets an MDT job, call `LoadPlayer(source, job)` on the server. When they lose it, call `UnloadPlayer(source, job)`. The server bridge includes a commented example.

{% hint style="info" %}
Both bridge files are open and can be edited.
{% endhint %}
