Skip to main content

πŸ–§ API β€” Server Side

Nearly all backend routing integrations occur exclusively inside the editable/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 in editable/server/ files and available to any external script via exports['xr-mdt']:ExportName(...).

Logging

AddLog Parameter Details:

Weapons


Vehicles

Finance Data Structure (for financed vehicles):
ownerOverride can be:
  • A citizenid string β€” assigns to that citizen.
  • 'police' β€” generates a LSPD XXX plate.
  • 'ambulance' β€” generates an EMS XXXX plate.

Sentences & Medical

[!WARNING] AddSentence broadcasts TriggerClientEvent('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 through EditTable.Events.SendDispatch(data) in editable/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 via Bridge.RegisterCommand() and respect framework-specific permission systems.

βš–οΈ Conviction System (LSPD)

The sentencing system applies fines and jail simultaneously. Override the logic in editable/server/lspd.lua:
[!IMPORTANT] For the complete editable API including all EditTable.Events, EditTable.Functions, EditTable.Queries, and per-module breakdowns, see the EditTable Reference β†’