Dependencies

2 min readUpdated 2 weeks ago

Required

ML HealthSystem declares three hard dependencies in fxmanifest.lua. The resource will not start if any are missing.

  • ml_bridge: Framework abstraction layer. Resolves player data, inventory operations, notifications, and usable-item binding without framework-specific exports.
  • ox_lib: Callbacks, zones, context menus, and notifications.
  • oxmysql: MySQL driver. Used for the three persistence tables (ml_healthsystem, ml_lifepoints, ml_health_tents).
fxmanifest.lua
1dependencies {
2    'ox_lib',
3    'oxmysql',
4    'ml_bridge',
5}

Framework

ml_bridge supports QBCore, QBox, ESX, and standalone. Pick the matching tab and add the ensure block to server.cfg. Load order matters: ml_bridge must start after the framework core and before ml_healthsystem.

server.cfg
1ensure qb-core
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ml_healthsystem
server.cfg
1ensure qbx_core
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ml_healthsystem
server.cfg
1ensure es_extended
2ensure oxmysql
3ensure ox_lib
4ensure ml_bridge
5ensure ml_healthsystem
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_healthsystem
Auto Detection

ml_bridge detects the running framework at startup. No framework setting exists in the ML HealthSystem config. The same build runs on QBCore, QBox, ESX, or standalone without edits.

Inventory

Item use, removal, and metadata route through ml_bridge. The shipped item definitions target ox_inventory: paste the 29 entries from _INSTALL/ox_items.txt (28 medical items plus respawn_tent) into ox_inventory/data/items.lua. Item keys must match shared/config/items.lua and Config.RespawnTent.Item exactly, the script binds "on use" via Bridge.BindUsableItem against those keys.

Item key parity

Renaming an item in ox_inventory/data/items.lua without updating the matching key in shared/config/items.lua (or shared/config/respawn.lua for the tent) breaks the bind. The item will exist in the inventory but do nothing on use.

Database

oxmysql is required because ML HealthSystem persists state across three tables, all created automatically on first start via CREATE TABLE IF NOT EXISTS:

  • ml_healthsystem: aggregated medical state per identifier (health_data LONGTEXT). Live injuries, bleeding, fractures, and diseases are tracked in real time during a session; this table is the persistence layer that survives disconnects and restarts.
  • ml_lifepoints: Life Points balance per identifier. Created only when Config.LifePoints.Enabled is true.
  • ml_health_tents: placed respawn tents (coords, heading, optional label).

No manual SQL import is needed.

Optional

  • pma-voice: Proximity voice muting on death and last stand. Controlled by Config.Voice in shared/config/effects.lua (Enable, System = 'pma-voice', MuteDead, MuteLastStand). Leave Config.Voice.Enable = false to skip it.