Setup Guide
Last updated
Was this helpful?
Last updated
Was this helpful?
Before starting, ensure all required dependencies for your server and framework are installed. See the page for a full list of what you’ll need. Double-check versions and requirements for your specific framework (QBox, QBCore, ESX, etc.).
Your database collation must match what your framework uses for player and vehicle identifiers.
For Qbox/QBCore:
Make sure players.citizenid
and player_vehicles.plate
columns have the same collation as the tables used by MDT (drx_players
and drx_vehicles
).
For ESX:
Match the collation of users.license
and owned_vehicles.plate
to your MDT tables.
How to Check or Change Collation: You can use a tool like HeidiSQL, phpMyAdmin, or MySQL CLI:
Open your database tool and navigate to your player/vehicle tables.
Check the collation type for the relevant columns.
If needed, right-click the column and select “Edit”, then set the collation to match your setup (commonly utf8mb4_general_ci
or utf8mb4_unicode_ci
).
Tip: Keeping collations consistent avoids character mismatch issues and failed lookups.
Your MariaDB database scheduler must be enabled for the MDT to function correctly. This is required for scheduled database events and automatic expiration features. If the scheduler is not enabled, scheduled cleanups and expiries will not run.
All database files are located in the drx_mdt/setup/database
folder within the resource.
3.1 – Import the Main Database Schema:
Import drx_mdt/setup/database/database.sql
into your server’s database.
3.2 – Import Framework-Specific SQL:
Import the SQL file that matches your framework, e.g.:
drx_mdt/setup/database/framework/qbox.sql
drx_mdt/setup/database/framework/qbcore.sql
drx_mdt/setup/database/framework/es_extended.sql
If using a custom framework, you may adapt one of these or create your own.
3.3 – Import Default Data Files:
Import all SQL files found in drx_mdt/setup/database/data
:
certificates.sql
charges.sql
departments.sql
disciplinary.sql
roles.sql
These files contain default values and can be customized in-game using the MDT.
Optional: Import Expiry Schedules
If you want certain data to expire automatically, you can also import optional files from drx_mdt/setup/database/schedules
:
charges.sql
: Enables automatic expiration for general charges.
points.sql
: Enables automatic expiration of points.
Verification:
After importing, confirm that the tables drx_players
and drx_vehicles
are populated with matching data from your framework (e.g., players
to drx_players
, player_vehicles
to drx_vehicles
for Qbox/QBCore).
Bridges are required for the MDT to communicate with your framework and other resources.
Premade Bridges:
You can find a selection of premade bridge files in: drx_mdt/setup/bridges/
Choose the bridges you need for your integrations, and copy them into: drx_mdt/server/public/bridge/
Customizing Bridges: Every server setup is unique, so bridges may require adjustments to fit your specific requirements. If you need to make changes, you can modify the bridge files directly to suit your integration. Please note that ongoing maintenance and customization of these bridges is the responsibility of each customer/server owner.
Don't see a bridge you need? If a bridge for your desired integration is not included, you are welcome to create your own. The system is designed to be flexible and accommodate a wide range of scripts.
Adjust your MDT web configuration to fit your server’s needs:
Edit the file: drx_mdt/web/configurations/settings.json
Configure all relevant options, including URLs, permissions, appearance, etc.
Everything should now be ready! To add the first officer (admin/setup step only):
Get the stateid
for the user from the drx_players
table.
Run the following command in your server-side console:
Replace {stateid}
with the appropriate value.
Important: This command should only be used to add the very first officer. Afterward, all hiring and management is handled through the MDT in-game.
That’s it! Your MDT is now fully set up and ready to use. If you run into any issues, check the troubleshooting section or reach out for support.