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.
1. MTM Ecosystem Integrations
Section titled “1. MTM Ecosystem Integrations”MTM-PADUI features deep out-of-the-box integrations with Mountain Mods infrastructure and traffic systems:
MTM Highway Matrix Signs
Section titled “MTM Highway Matrix Signs”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.
MTM Trajectcontrole (Average Speed Check)
Section titled “MTM Trajectcontrole (Average Speed Check)”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.
MTM ANPR Surveillance Network
Section titled “MTM ANPR Surveillance Network”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.
2. Registering Custom Applications
Section titled “2. Registering Custom Applications”You can register custom applications using two primary methods:
- Static Registration via
config.lua - 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 }}Method 2: Dynamic Client Export
Section titled “Method 2: Dynamic Client Export”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})Method 3: Dynamic Server Export
Section titled “Method 3: Dynamic Server Export”The server can broadcast an app to all players or register an app for a specific client:
-- Broadcast to all connected clientsexports['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 onlyexports['MTM-PADUI']:RegisterApp(appData, targetSource)3. App Icon Customization Guide
Section titled “3. App Icon Customization Guide”MTM-PADUI features an intelligent icon rendering engine (MtmAppSDK.renderIcon) supporting four formats:
1. FontAwesome Icons
Section titled “1. FontAwesome Icons”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'2. Custom Image File or URL
Section titled “2. Custom Image File or URL”Provide a path to an image file or direct HTTP link:
-- Local resource image pathicon = 'assets/icons/custom_app.png'
-- External CDN / Web linkicon = 'https://example.com/icons/police_shield.png'Supported formats include .png, .jpg, .webp, and .svg.
3. Raw SVG Markup
Section titled “3. Raw SVG Markup”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>'4. Background Gradient Styling (iconBg)
Section titled “4. Background Gradient Styling (iconBg)”Set a modern CSS gradient or solid color to match your app branding:
-- Dark Blue / PoliceiconBg = 'linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%)'
-- Amber / Highway AuthorityiconBg = 'linear-gradient(135deg, #d97706 0%, #f59e0b 100%)'
-- Emerald / MedicaliconBg = 'linear-gradient(135deg, #059669 0%, #10b981 100%)'
-- Solid Dark SlateiconBg = '#1e293b'4. Permission & Role-Based Access Engine
Section titled “4. Permission & Role-Based Access Engine”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.
Supported Permission Parameters
Section titled “Supported Permission Parameters”| 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). |
Example: Role-Restricted Application
Section titled “Example: Role-Restricted Application”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})5. Developer Exports Reference
Section titled “5. Developer Exports Reference”Client-Side Exports
Section titled “Client-Side Exports”Tablet Lifecycle
Section titled “Tablet Lifecycle”-- Open the tabletexports['MTM-PADUI']:OpenTablet()
-- Close the tabletexports['MTM-PADUI']:CloseTablet()
-- Toggle open/close stateexports['MTM-PADUI']:ToggleTablet()Application Management
Section titled “Application Management”-- Register an app dynamicallyexports['MTM-PADUI']:RegisterApp(appData)
-- Launch a specific application directlyexports['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 screenexports['MTM-PADUI']:UninstallApp("arcade_snake")Inter-App Communication
Section titled “Inter-App Communication”-- Forward a payload to an active app iframeexports['MTM-PADUI']:ForwardToApp("mtm_anpr", { action = "highlightPlate", plate = "74ABC123"})System Shell & Notifications
Section titled “System Shell & Notifications”-- Display an iPadOS banner toast notificationexports['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 centerexports['MTM-PADUI']:ResetPosition()Server-Side Exports
Section titled “Server-Side Exports”-- Register an app and broadcast to all connected clientsexports['MTM-PADUI']:RegisterApp(appData)
-- Register an app for a specific client sourceexports['MTM-PADUI']:RegisterApp(appData, targetSource)