Installation
This guide covers installing lo_mdtbf on a RedM server running VORP.
Prerequisites
Before you begin, make sure you have:
- A working RedM server with the VORP framework.
- The
vorp_core,vorp_inventoryandoxmysqlresources installed and started. - A MySQL/MariaDB database connected through
oxmysql. - The three MDT items declared in
vorp_inventory.items:mdt_bf,official_warrant,official_prescription.
1. Add the resource
Drop the lo_mdtbf folder into your resources/ directory (e.g. resources/[scripts]/lo_mdtbf), then add it to your server.cfg (see the start order below).
2. Database
Schema installation is automatic. When the resource starts, server/database.lua reads sql/install.sql via LoadResourceFile and runs each statement. There is no manual import to perform.
Tables created (lo_mdtbf_ prefix):
lo_mdtbf_citizens— citizen registrylo_mdtbf_reports— reports (and jail records via thejailfield)lo_mdtbf_notes— notes attached to citizenslo_mdtbf_mandats— warrantslo_mdtbf_ordonnances— court orders / judicial contractslo_mdtbf_enquetes— investigationslo_mdtbf_effectifs— staff records (FDO)
NOTE
The script first tries to rename legacy jo_mdt_* tables to lo_mdtbf_* (migration from an earlier version). If those tables don't exist, the error is swallowed silently — this is normal on a fresh install. The console prints a summary like Database ready - N statement(s) ok, M failed, where the failures correspond to migrations that were already applied.
3. Start order
Start lo_mdtbf after its dependencies. In your server.cfg:
ensure vorp_core
ensure vorp_inventory
ensure oxmysql
ensure lo_mdtbf4. Configure jobs
By default, the MDT can only be opened by a predefined list of jobs. Adapt Config.AllowedJobs (open) and Config.AllowedJobsManage (create/edit/delete) to your server's jobs.
See the Configuration page for the full breakdown of jobs, stations and grades.
5. Interface (UI)
No build step is required: the NUI interface (Vue 3) is already shipped pre-built in web/dist/. The resource points directly to web/dist/index.html. You don't need to install Node.js or run npm run build.
Verification
- Start the server and check the console: a
[lo_mdtbf] Database ready - ...message should appear. - Log in with a character whose job is listed in
Config.AllowedJobs. - Use the
mdt_bfitem (or the/mdtbfcommand) to open the MDT.
WARNING
With Config.DevMode = true (the default), the on-duty check is skipped server-side: only the job is validated. This is handy for testing, but on a production server you must set Config.DevMode = false so that only on-duty officers can open the MDT.