
What is MDT (FiveM): In-Game Police Computer Systems
June 7, 2025
Last Updated: February 24, 2026
1 min read
MDT systems in FiveM are interactive interfaces that simulate law enforcement computer terminals, enabling players to access criminal databases, file reports, and manage emergency service operations within roleplay servers.
Technical Architecture
MDTs typically use one of three implementation approaches:
1. NUI (CEF) Based - Most Common
text
-- Client-side NUI trigger example
RegisterCommand('mdt', function()
SetNuiFocus(true, true)
SendNUIMessage({
type = 'open',
officer = GetPlayerName(PlayerId()),
badge = GetPlayerServerId(PlayerId())
})
end)
-- Server-side database query
RegisterServerEvent('mdt:searchPerson')
AddEventHandler('mdt:searchPerson', function(firstname, lastname)
MySQL.Async.fetchAll('SELECT * FROM users WHERE firstname = @first AND lastname = @last', {
['@first'] = firstname,
['@last'] = lastname
}, function(result)
TriggerClientEvent('mdt:returnSearch', source, result)
end)
end)
2. External Web Application
- Standalone web app (React/Vue.js)
- Communicates via REST API or WebSockets
- Example endpoint structure:
text
// API endpoint example
app.post('/api/mdt/warrant/create', authenticate, (req, res) => {
const { suspect_id, charges, issuing_officer } = req.body;
// Database insertion logic
});
3. In-Game Tablet Resource
- Uses FiveM's tablet prop with custom UI
- More immersive but performance-intensive
Core Features Implementation
Database Schema Example:
CREATE TABLE mdt_reports (
id INT AUTO_INCREMENT PRIMARY KEY,
incident_id VARCHAR(10) UNIQUE,
reporting_officer INT,
suspects TEXT,
charges TEXT,
evidence TEXT,
created_at TIMESTAMP DEFAULT CURRENTStay in the Loop
Get the latest FiveM tutorials, mod releases, and exclusive updates delivered to your inbox.
No spam. Unsubscribe anytime.
Share Article