Installation
lo_mdtmedic deploys like any standard VORP resource. The database is installed automatically on boot and the NUI interface is already built: no npm/pnpm command is required.
Requirements
- A working RedM server.
- The VORP framework installed and operational.
- The following resources started before
lo_mdtmedic:vorp_corevorp_inventoryoxmysql
1. Add the resource
Place the lo_mdtmedic folder into your server's resources/ directory (for example resources/[dks]/lo_mdtmedic).
resources/
└── lo_mdtmedic/
├── client/
├── server/
├── shared/
├── locales/
├── sql/
│ └── install.sql
├── web/
│ └── dist/ # NUI interface, already built
├── config/
│ └── config.lua
└── fxmanifest.lua2. Database
Database setup is automatic. On boot, the resource reads sql/install.sql via LoadResourceFile and runs each statement against your oxmysql database. The schema is idempotent (CREATE TABLE IF NOT EXISTS + ALTER migrations guarded by pcall), so it can be re-run safely.
No manual action is needed: you only need oxmysql connected to your VORP database. On boot, the console prints a message like:
[lo_mdtmedic] Database ready - N statement(s) ok, M failed (migration ALTERs).NOTE
The counted failures (M failed) correspond to ALTER migrations on columns that already exist — this is normal on an up-to-date database.
TIP
You may also import sql/install.sql manually in your SQL manager if you prefer to control the operation. The result is identical thanks to the script's idempotence.
3. Start order
Add the resource to your server.cfg, after its dependencies:
ensure oxmysql
ensure vorp_core
ensure vorp_inventory
ensure lo_mdtmedicWARNING
lo_mdtmedic depends on vorp_core, vorp_inventory and oxmysql. If the resource starts before any of them, opening the MDT, the inventory and database access will fail.
4. Configure the jobs
By default, only certain medical jobs can open the MDT. Adjust Config.AllowedJobs and Config.JobConfig to match your jobs and permissions.
See the Configuration page for the details on allowed jobs, minimum grades and per-feature permissions (certificates, autopsies, pricing).
5. Interface (UI)
The NUI interface is an already-built Vue 3 application. The build is shipped in web/dist/ and referenced by the manifest (ui_page 'web/dist/index.html').
NOTE
The web/src/ sources are not included in the shipped resource: there is no build step to run. Drop the resource in as-is.
Verification
- Start (or restart) the server, then connect in-game with a character holding a job listed in
Config.AllowedJobs. - Check the console for the
[lo_mdtmedic] Database ready - ...message. - Use the
mdt_medicitem or type the/mdtmediccommand: the MDT interface should open.
WARNING
If nothing opens, make sure you are on duty. Server-side, the on-duty check is skipped only when Config.DevMode = true. This mode is enabled by default for testing: set Config.DevMode = false in production.