Skip to content

np_mdt installation ​

np_mdt connects a FiveM server to the MDT. It's one resource for every use case. Each use case is a module that you switch on in config/core.lua. Until 2026-10 it was called np_mdt-medic and only did the medical part.

Not yet tested on a live server

The resource is covered by unit tests (busted for the Lua, bun test for the NUI), but the acceptance run on a real FiveM server is still pending. Try it on a test server with a test guild first.

Requirements ​

Nothing. fxmanifest.lua has no dependency entries. What's running gets used, and anything missing is covered by a built-in fallback (see Bridges). The NUI is bundled and checked in, so there's no build step.

You need:

  • An MDT instance (see Setup) and an API key for it.
  • For any player-facing feature: players with a linked Discord account. The MDT identifies players by their Discord id.

Steps ​

  1. Copy the np_mdt folder into your resources/ and keep the name.
  2. Add to server.cfg, after your framework and other optional dependencies:
    cfg
    set np_mdt_url "https://mdt.npdev.eu"
    set np_mdt_api_key "stmp_…"
    ensure np_mdt
    Use set, not setr: the key must never reach clients. The old convars np_medic_mdt_url and np_medic_api_key still work when the new ones are missing.
  3. Pick your modules in config/core.lua (see Configuration). By default only medic and dispatch start.
  4. Restart and check the console. You should see the bridge line and any setup findings:
    [np_mdt] bridge: db=oxmysql framework=esx_current inventory=ox target=ox ui=oxlib

The API key ​

The key belongs to exactly one guild, so a test key can't write into your real guild. Which kind you need depends on the modules you enable:

ModuleNeeds
medicAn unscoped key. The medic routes don't accept scoped keys
dispatchcalls:call.report (plus calls:read for waypoints to assigned units)
ranksranks:personal.ranks_set
timeclocktimeclock:shift.ingame_clock
funkunits:unit.ingame_status, employees:read, calls:call.report
kioskfacility:queue.ingame_ticket
ausweisemployees:read
tabletsessions:ingame.tablet_login. Only scoped keys can have it; unscoped keys get 403

An unscoped key (from /apikey create) may do everything in its guild except the tablet login. Because the resource reads a single np_mdt_api_key, medic and tablet can't currently run on the same server. Scoped keys need capabilities:read so that the start-up check can see what they're allowed to do.

Checking the setup ​

At start the resource asks the MDT what its key may do and compares that with the enabled modules. Problems are printed to the console, for example:

[np_mdt] Einrichtung: Modul ranks: Scope fehlt: ranks:personal.ranks_set
[np_mdt] Einrichtung: Modul medic braucht einen Schluessel ohne Scopes; ...
CommandWhereShows
mdtstatusServer console, or in game with the ACE command.mdtstatusEnvironment, modules, chosen bridges, setup findings, medic queue and dispatch outbox
medicstatusServer consoleMedic sync: connection, queue depth, dead letters

Test mode ​

cfg
set np_mdt_environment "test"

The start-up log says so loudly, and every call sent to dispatch gets [TEST] in its title. Use it with a test key for a test guild.

Troubleshooting ​

SymptomFix
Kein API-Schluessel gesetztnp_mdt_api_key is empty. Set it with set in server.cfg
MDT nicht erreichbarCheck np_mdt_url and that the server can reach it
HTTP 401The key is invalid or was deleted. Create a new one
Scope fehlt: …The scoped key lacks a scope for an enabled module. Issue a new key or switch the module off
Players get Ohne verknüpftes Discord …The player has no Discord identifier. Discord must be running and linked in FiveM
Wrong framework / inventory detectedStart dependencies before np_mdt, or pin them with Config.Bridge (see Bridges)

np_* FiveM resources