# MDT

Compatible with QBCore and ESX

<figure><img src="https://3753958376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjHRcNvh2OlfqeGmFMCgw%2Fuploads%2FuSUZxpIvZthkpj6GHCic%2Fmdt.png?alt=media&#x26;token=94aa1ae7-121c-4c0f-89df-849936a32d8e" alt=""><figcaption></figcaption></figure>

&#x20;   \|             [Tebex ](https://xenscripts.tebex.io/package/5453123)          |             CFX.re            |             Youtube Preview           |        Discord        |

## Installation

### Dependencies

* [x] **oxmysql** - Download: <https://github.com/overextended/oxmysql>
* [x] **ps-dispatch** (Optional) - Download: <https://github.com/Luckshya/ps-dispatch> (This is our fork and we have made it configurable for both QBCore and ESX with a sinlge line change)

### Installing in server

* Make sure oxmysql installed in resources folder
* Place xn-mdt.zip in resources folder
* Extract xn-mdt.zip
* Add `ensure oxmysql` (if not already present)
* Add `ensure xn-mdt`
* (Optional) Download `ps-dispatch` from given link above and change `Config.Core = "ESX"` (for ESX) in `config.lua` of **ps-dispatch** and rename the folder to `ps-dispatch`

### Setting up database

* Delete any table whose name starts with mdt in your database
* Import mdt.sql file in your database present in xn-mdt folder

## Config

### Config.lua

Read comments in config.lua for more info

### locales.lua, dist/locales.js

Locales config for your own custom translations

### dist/charges.js

There is already a predefined charges list with 5-6 charges to understand the format. Make sure to follow the same format

### dist/emsReportTypes.js

Set your own report types for Reports tab in EMS MDT

### dist/evidenceColors.js

Set colors for different evidence types

Available colors are: red, black, blue, purple, white only

### dist/reductions.js

This is config to add available reductions to reduce the total fine by some percentage

5 will mean 5% reduction option to be available

<mark style="color:red;">Warning: This is for initial setup only, dont change it once incidents are created in MDT</mark>

## Commands

<details>

<summary>/mdt</summary>

Opens Police MDT if job is police

Opens Lawyer MDT if job is lawyer

</details>

<details>

<summary>/emsmdt</summary>

Opens EMS MDT

</details>
