1. Prerequisites
Ensure you have the following resources installed and started before XR-MDT:oxmysqlox_lib- Your choice of framework (
qb-core,es_extended, orqbox-core)
2. General Installation Steps
- Download: Get
xr-mdtfrom Keymaster. - Extract: Unzip into your
resourcesfolder. - Database: Import
xr-mdt.sqlinto your database. - Configuration: Open
configs/config.main.luaand verify your framework and notification settings. - Start script: Add
ensure xr-mdtto yourserver.cfg.
3. Framework Specific Setup
🔵 QB-Core / Qbox
- Open
qb-core/shared/items.luaand add the tablet item (see section 4). - The script automatically detects these frameworks.
- Ensure your
playerstable has acharinfocolumn (default in QB).
🟢 ESX (Legacy/Latest)
- Database Bridge: ESX requires specific columns in the
userstable for some MDT features. - Vehicle System: For LSPD/EMS vehicle shop integration, you must ensure your
owned_vehiclestable is prepared. - Phone Number Integration: By default, the script looks for
phoneNumberin your player data. If your phone script uses a different column or key, adjust it inconfigs/config.main.lua:
🚘 ESX Vehicle Database Modification
Run the following SQL to ensure yourowned_vehicles table supports the MDT’s vehicle tracking:
🛠Vehicle Insertion Code Example
If you are modifying a vehicle shop or garage to work with MDT, use the following logic to insert vehicles into the database. ESX Example:4. � Tablet Item Installation
To enable opening the tablet via an inventory item:Item Definitions
QB-Core (shared/items.lua):
data/items.lua):
Script Registration
Add this code toeditable/server/main.lua to make the item usable:
5. Post-Installation
- Join the server.
- Set your job to
police(or another supported job). - Use the
tabletitem, type/mdt, or pressINSERTto verify it opens.
6. Banking & Accounts Integration
XR-MDT supports most popular banking systems out of the box. The integration is handled through a bridge ineditable/server/main.lua.
Supported Systems (Auto-detected):
Renewed-Bankingxr-bankqb-banking(QB-Core default)qbx_management(Qbox default)esx_addonaccount(ESX society accounts)
How to verify or change your banking bridge:
If your server uses a custom banking script or different exports, you can manually adjust the logic ineditable/server/main.lua under the Bridge.Bank section (approx. line 226).
Functions you can modify:
Bridge.Bank.GetBalance(accountName)- Returns the current balance.Bridge.Bank.AddMoney(accountName, amount)- Adds money to the account.Bridge.Bank.RemoveMoney(accountName, amount)- Removes money from the account.
my-custom-bank, modify the function like this:
