π§ API β Server Side
Nearly all backend routing integrations occur exclusively inside theeditable/server/ folder without exposing core escrowed code. This page covers server exports, secure event triggers, and admin commands. For the full EditTable reference, see the dedicated EditTable Reference.
π€ Server Exports
All exports are registered ineditable/server/ files and available to any external script via exports['xr-mdt']:ExportName(...).
Logging
AddLog Parameter Details:
Weapons
Vehicles
ownerOverride can be:
- A citizenid string β assigns to that citizen.
'police'β generates aLSPD XXXplate.'ambulance'β generates anEMS XXXXplate.
Sentences & Medical
[!WARNING]AddSentencebroadcastsTriggerClientEvent('xr-mdt:client:citizenUpdated', -1, citizenId)after recording. This refreshes the profile on all open MDT instances.
Device Toggles
These exports bypass item checks and directly trigger device actions:Database Auditor
β‘ Server Events (NetEvents)
xr-mdt:server:triggerDispatch
Force a dispatch notification to all on-duty players in specified jobs. Can be triggered from a client via TriggerServerEvent or from another server script.
[!TIP] The dispatch is routed throughEditTable.Events.SendDispatch(data)ineditable/server/main.lua. Override that function to add custom behavior (e.g., forward to external CAD, Discord webhook).
xr-mdt:server:triggerNotification
Send a NUI notification directly to a player from any script:
xr-mdt:server:requestOpenMDT
Sent by the client when the player presses the MDT keybind or command. Internally validates the playerβs job and triggers xr-mdt:client:open:
π§ Admin Commands (Server)
These commands are registered viaBridge.RegisterCommand() and respect framework-specific permission systems.
βοΈ Conviction System (LSPD)
The sentencing system applies fines and jail simultaneously. Override the logic ineditable/server/lspd.lua:
[!IMPORTANT] For the complete editable API including allEditTable.Events,EditTable.Functions,EditTable.Queries, and per-module breakdowns, see the EditTable Reference β
