Skip to content

Integrations & App Development

MTM-PADUI functions as an open application platform for FiveM. Any resource (in-game scripts, dispatch systems, external web portals, or custom tools) can be mounted directly into the tablet interface.


MTM-PADUI features deep out-of-the-box integrations with Mountain Mods infrastructure and traffic systems:

Overhead highway gantries configured with MTM-MATRIXBORDEN or MTM-MATRIXDEV can be inspected and operated directly from the tablet:

  • Interactive Matrix Map: Launch the full motorway overview to view live gantry statuses and active advisory speeds across San Andreas.
  • Lane Control: Toggle lane closures (Red Cross), lane opening arrows, and merge arrows directly from the mobile tablet.
  • Incident Warnings: Deploy real-time hazard warnings (Traffic Jam, Accident, Slippery Road) while on scene.

The highway corridor speed enforcement system docks directly into MTM-PADUI:

  • Route Monitoring: View all registered entry/exit camera portals and live radar traps.
  • Live Section Telemetry: Monitor passing vehicle timestamps, speed measurements, and active average speed calculations.
  • Dynamic Limit Sync: Displays real-time adjustments when overhead matrix signs change corridor speed limits.
  • Borderless Viewport: Trajectcontrole detects when running inside MTM-PADUI (?padui=true) and automatically adapts its viewport layout to avoid bezel clipping.

The Automatic Number Plate Recognition system integrates directly into MTM-PADUI:

  • Instant ANPR Alerts: Live notifications and auditory chimes appear on the tablet when a wanted plate passes a roadside camera pole.
  • Photo Evidence Inspection: View high-resolution captures uploaded to the Discord CDN directly in the tablet screen.
  • BOLO Hotlist Management: Search, register, or clear active BOLO entries directly from patrol vehicles.
  • Predictive Radar Tracking: Inspect calculated flight paths and dynamic radar interception circles.

You can register custom applications using two primary methods:

  1. Static Registration via config.lua
  2. Dynamic Registration via Client or Server Exports

Method 1: Static Configuration (config.lua)

Section titled “Method 1: Static Configuration (config.lua)”

Add an entry to Config.CustomApps in config.lua:

Config.CustomApps = {
{
id = 'police_cad',
name = 'Police MDT',
category = 'Hulpdiensten & Politie',
subCategory = 'MDT & Dispatch',
description = 'Official law enforcement mobile data terminal.',
author = 'State Police',
version = 'v3.2.0',
rating = '5.0 (Certified)',
icon = 'fa-solid fa-shield-halved',
iconBg = 'linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%)',
launchType = 'iframe',
iframeUrl = 'nui://my_mdt/web/index.html',
clientEvent = 'mdt:client:onOpenTablet',
installed = true
}
}

Other scripts can dynamically register apps on the client at runtime:

exports['MTM-PADUI']:RegisterApp({
id = 'taxi_meter',
name = 'Taxi Dispatch',
category = 'Diensten & Vervoer',
description = 'Manage incoming taxi bookings and fare meters.',
author = 'Downtown Cab Co.',
version = 'v1.0.0',
icon = 'fa-solid fa-taxi',
iconBg = 'linear-gradient(135deg, #eab308 0%, #ca8a04 100%)',
launchType = 'iframe',
iframeUrl = 'nui://mtm-taxi/ui/index.html',
jobs = { 'taxi' }, -- Restricted to taxi drivers
installed = false
})

The server can broadcast an app to all players or register an app for a specific client:

-- Broadcast to all connected clients
exports['MTM-PADUI']:RegisterApp({
id = 'emergency_broadcast',
name = 'Civil Defense',
category = 'Overheid',
icon = 'fa-solid fa-bullhorn',
launchType = 'iframe',
iframeUrl = 'nui://emergency/ui/index.html',
installed = true
})
-- Send to a specific player ID only
exports['MTM-PADUI']:RegisterApp(appData, targetSource)

MTM-PADUI features an intelligent icon rendering engine (MtmAppSDK.renderIcon) supporting four formats:

Use any standard FontAwesome class name in the icon field:

icon = 'fa-solid fa-camera-retro'
icon = 'fa-solid fa-route'
icon = 'fa-solid fa-car-side'
icon = 'fa-solid fa-triangle-exclamation'

Provide a path to an image file or direct HTTP link:

-- Local resource image path
icon = 'assets/icons/custom_app.png'
-- External CDN / Web link
icon = 'https://example.com/icons/police_shield.png'

Supported formats include .png, .jpg, .webp, and .svg.

For complete vector control, provide an SVG string using iconSvg:

iconSvg = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>'

Set a modern CSS gradient or solid color to match your app branding:

-- Dark Blue / Police
iconBg = 'linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%)'
-- Amber / Highway Authority
iconBg = 'linear-gradient(135deg, #d97706 0%, #f59e0b 100%)'
-- Emerald / Medical
iconBg = 'linear-gradient(135deg, #059669 0%, #10b981 100%)'
-- Solid Dark Slate
iconBg = '#1e293b'

MTM-PADUI includes a multi-framework permission engine that dynamically shows or hides applications on the Home Screen and App Store. If the player does not meet the requirements, the application is completely removed from the tablet DOM.

Parameter Type Description
jobs / job string or table Allowed job names (e.g. 'police' or {'police', 'sheriff'}).
minGrade number Minimum required job rank/grade level.
gangs / gang string or table Allowed gang names (QBCore / Qbox).
groups / roles string or table Framework group (e.g. 'admin', 'moderator').
ace / acePerm string or table FiveM server ACE permission (e.g. 'command.tablet').
citizenids string or table Explicit citizen IDs or FiveM licenses allowed.
requireAll boolean If true, player must satisfy every listed condition. Default is false (any match grants access).
exports['MTM-PADUI']:RegisterApp({
id = 'police_surveillance',
name = 'Police Surveillance',
category = 'Hulpdiensten & Politie',
icon = 'fa-solid fa-video',
iconBg = 'linear-gradient(135deg, #0f172a 0%, #1e293b 100%)',
launchType = 'iframe',
iframeUrl = 'nui://surveillance/ui/index.html',
jobs = { 'police', 'sheriff' },
minGrade = 2,
installed = true
})

-- Open the tablet
exports['MTM-PADUI']:OpenTablet()
-- Close the tablet
exports['MTM-PADUI']:CloseTablet()
-- Toggle open/close state
exports['MTM-PADUI']:ToggleTablet()
-- Register an app dynamically
exports['MTM-PADUI']:RegisterApp(appData)
-- Launch a specific application directly
exports['MTM-PADUI']:OpenApp("mtm_anpr")
-- Close the currently active app (returns to Home Screen)
exports['MTM-PADUI']:CloseApp()
-- Uninstall an app from the user's home screen
exports['MTM-PADUI']:UninstallApp("arcade_snake")
-- Forward a payload to an active app iframe
exports['MTM-PADUI']:ForwardToApp("mtm_anpr", {
action = "highlightPlate",
plate = "74ABC123"
})
-- Display an iPadOS banner toast notification
exports['MTM-PADUI']:SendNotification(
"Speed Warning", -- Title
"Vehicle exceeded limit by 25 km/h", -- Body
"fa-solid fa-triangle-exclamation", -- Icon (FontAwesome or character)
"Trajectcontrole" -- App display name
)
-- Set system language ('nl', 'en', etc.)
exports['MTM-PADUI']:SetLanguage("en")
-- Set chassis screen position offset (pixels)
exports['MTM-PADUI']:SetPosition(100, -50)
-- Reset tablet position back to screen center
exports['MTM-PADUI']:ResetPosition()
-- Register an app and broadcast to all connected clients
exports['MTM-PADUI']:RegisterApp(appData)
-- Register an app for a specific client source
exports['MTM-PADUI']:RegisterApp(appData, targetSource)