F.A.Q
Setup
Set Config.Locale in shared/config/core.lua. Default is 'en'. Use any file present in the locales/ folder.
1Config.Locale = 'en'The config is split across shared/config/*.lua, one file per domain: core, vitals, bodyparts, diseases, items, anim_presets, masks, effects, fractures, integrations, item_diseases, lifecycle, security, ui, respawn, open. Server-only values (webhooks, Life Points, inventory wipe, revive/hospital reset) live in server/config_server.lua. All of these are unencrypted and editable.
Balance numbers (internal/balance/*.lua) are escrowed and cannot be edited, see the Configuration section.
- Check
server.cfgensure order:oxmysql→ox_lib→ml_bridge→ml_healthsystem. - Verify
ml_bridgeis present in the resources folder and started. - Check the server console for dependency errors.
- Confirm the entries from
_INSTALL/ox_items.txtare inox_inventory/data/items.lua. - Restart the inventory resource after adding items.
- Item names must match exactly between
shared/config/items.lua(Config.MedicalItems) and the inventory. "On use" is wired by the script throughBridge.BindUsableItem: do not add your ownserver.export/client.exportto these items. - Drop the PNGs from
_INSTALL/images/intoox_inventory/web/images/.
Bridge.HasPermissionchecks the framework ACE permissions.- For QBCore/Qbox: the player needs
god,admin, orsuperadmin. - Console commands (source 0) bypass permission checks.
- Life Points staff rights are a separate list,
Config.LifePoints.StaffPermissionsinserver/config_server.lua(defaultsgod,admin).
Damage and Injuries
The system tracks 9 body zones: head, neck, chest, spine, pelvis, left/right arm, left/right leg. Each hit maps to a zone via bone detection. Wounds accumulate per zone with 4 severity levels. Minor, Painful, Severe, Critical (Config.WoundLevels in shared/config/vitals.lua), each with its own movement rate. Per-part gameplay flags (armored, can-fracture, fracture restrictions, cast duration) live in Config.BodyParts in shared/config/bodyparts.lua. The fracture thresholds and chances are balance numbers in the escrowed internal/balance/balance.lua and are not editable.
Fractures ship enabled: Config.Fractures.enabled = true in shared/config/fractures.lua, and every part except the pelvis has canFracture = true in shared/config/bodyparts.lua. Set enabled = false to turn them off, or canFracture = false on single parts.
When active, accumulated bone damage past the threshold triggers a fracture and applies the penalties in Config.FracturePenalties (per part: allowShoot, allowDrive, limp, sprint, aimShake, shakeIntensity). Cast items (arm_cast, leg_cast, neck_brace, body_cast) fix fractures and attach a visible bone-mounted plaster prop.
Impact speed is checked against Config.VehicleCrash.Tiers in shared/config/effects.lua. Three tiers ship: 40+ km/h, 70+ km/h, 100+ km/h. Each tier has independent damage, bleedChance, fractureChance, and stagger. The shipped defaults set fractureChance = 0 on all tiers to avoid random deaths from crashes. Edit the tier table to retune.
Parts flagged armored = true in Config.BodyParts (shared/config/bodyparts.lua) benefit from equipped armor, chest, spine, pelvis by default. Protection reduces bleed chance by 80% and damage by 20% (Config.ArmorSettings.BleedReduction / DamageReduction in shared/config/vitals.lua) and requires armor above MinArmorForProtection (5.0).
Blood System
New characters receive one of eight default blood types: 0+, A+, B+, AB+, 0-, A-, B- or AB-. Existing types remain stored. Assignment weights and transfusion rules are editable in shared/config/blood_groups.lua.
1Config.Blood.Transfusion.Compatibility = 'abo_rh'
2Config.Blood.Transfusion.IncompatibleAction = 'reject'
3Config.Blood.Transfusion.LegacyRh = 'abo'The default checks ABO and Rh. It rejects incompatible bags before consumption or damage. Legacy types without a sign use ABO compatibility by default. Blood volumes and thresholds remain in shared/config/vitals.lua.
1Config.Blood.Transfusion.Compatibility = 'off'This accepts any bag regardless of its type and preserves the blood types already stored in the database. To use ABO compatibility while ignoring + and -, set the mode to abo.
1Config.Blood.Transfusion.Compatibility = 'abo'Disease transmission is configured separately:
1Config.Blood.Transfusion.DiseaseTransmission = falseYes. Standard types without a sign are supported as legacy data. With the default LegacyRh = 'abo', a pair containing such a type is checked by ABO only. No Rh sign is added automatically.
1Config.Blood.Transfusion.LegacyRh = 'reject'Use reject in abo_rh mode to block a transfusion when the recipient or donor lacks an Rh sign. Changing this setting does not change database values. O and 0 are accepted as the same group.
The bag may be incompatible, have a missing or invalid group, or the patient's blood type may not be loaded. The selected inventory slot is checked again before the bag is consumed. Rejected bags are preserved.
1Config.Blood.Transfusion.UnknownBagType = 'reject'Set this field to universal only to accept bags whose type is absent or blank. It does not accept invalid non-empty types while compatibility checks are enabled. Newly drawn bags show their group in the label and description.
Below WeaknessThreshold (4.5L): movement penalties and screen effects. Below CriticalLevel (3.0L): severe debuffs and visual impairment. At DeathThreshold (0.0L): death from blood loss. Blood regenerates at RegenRate (0.05/tick), boosted to RegenBoost by a saline drip. Bleeding drains blood per Config.Blood.BleedingRates scaled by the active bleed level (1-4).
Diseases
Six, in shared/config/diseases.lua: influenza (Viral Flu), patogeno_vx_9 (VX-9 Pathogen), radiazioni (Radiation Sickness), infezione (Wound Infection), intossicazione (Food Poisoning), tetano (Tetanus). These are starting defaults, not a fixed set, add, remove, or rewrite diseases freely (stages, effects, cures, contagion) in that file. Each disease references locale keys for its stage names and messages, so a new disease also needs matching keys in locales/.
Contagious diseases spread by proximity. Each disease's contagious block defines distance, chance (per check), interval, and useMasks. Of the shipped diseases only influenza is contagious. Masks cut infection chance, Config.MaskSystem (shared/config/masks.lua) supports item-based masks and clothing-based protection, each with a protection percentage (0-100).
Yes. A stage with terminal = true runs lastStand and death effects. Among the defaults, patogeno_vx_9, radiazioni, infezione, and tetano have terminal stages. Cure items respect maxCurableStage: applying the cure past that stage fails with the disease's tooLateMessage. influenza and intossicazione are non-fatal (intossicazione even has naturalRecovery).
If optional zombie transformation is enabled, the configured trigger stage transforms the player instead of applying that disease's terminal last stand and delayed death. The default trigger is VX-9's terminal stage. Other diseases and medical damage still apply.
From shared/config/items.lua (Config.MedicalItems):
paracetamol→influenzaretroxin→patogeno_vx_9radiation_antidote→radiazioniantibiotics→infezione,tetanoherbal_infusion→intossicazionevitalex→infezione,tetano,intossicazione,influenza(broad cure)vitamin_cocktail→infezione
Cures are tied to disease keys, so renaming a disease means updating the matching item's disease field.
Suppressors pause progression without curing. A disease's treatment.suppressors maps an item to a keepAt stage and a duration, optionally pauseEffects = true. Example: vitalex holds influenza at stage 1 for 1h. Progression resumes when the suppressor expires.
Zombie transformation
Set Config.ZombieTransformation.Enabled = true in shared/config/zombie.lua. The default trigger is the terminal stage of patogeno_vx_9, which is used by the bite integration. You can map other diseases and stages to profiles or call the server TransformPlayer export directly. Keep it disabled to retain the ordinary disease behavior.
The default profile keeps the original ped, face and clothes. It changes movement and freemode eye color, adds a local screen effect and applies the configured restrictions. Optional model mode uses a model installed on your server and a registered appearance provider; no addon skin is included. That provider must capture and restore the complete original character.
The default profile blocks weapons, inventory access where supported, sprinting, jumping, climbing and vehicle entry. Unarmed attacks remain available. Each restriction has its own profile switch. Weapons and items stay in the inventory. ox_inventory has a built-in lock integration; other inventories need a provider if they do not honor its flags. Death continues to use its own restrictions.
By default, there is no recovery timer or health decay. Death suspends the transformation effects; an authorized respawn cures it, while a revive preserves it according to Lifecycle. Configure a duration with ExpiryAction = 'cure' or 'death', enable health decay, offer the optional special antidote, or call CureZombie from a trusted server resource. Disconnecting does not cure the character or renew its timer. Offline progression is disabled by default.
The normal VX-9 cure still respects maxCurableStage. The optional zombie antidote is a separate treatment and ships disabled. Enabling it requires its inventory item and the configured medic/self-treatment policy.
Yes, when the NPC resource checks ShouldZombiesIgnorePlayer. This setting does not control another script's AI automatically. Use the server export for target selection and check again before an attack. Subscribe to the state change event to drop protected targets. Client-driven AI must handle unknown or stale state and refresh visible players. The Developer guide includes both integration examples.
Unarmed attacks are allowed by the default profile, but melee infection ships disabled. Enable MeleeInfection.Enabled to roll the configured infection chance after a confirmed unarmed hit. The server checks proximity, routing bucket, cooldown and matching damage reports. Custom combat resources may need an adapter if they do not produce the expected damage events.
The server owns transformation state and sends it to clients in scope. Clients apply the configured presentation to nearby player peds, including after they return to scope. Movement and screen effects apply to the transformed player; observers render scoped cosmetics. Custom inventory and appearance providers must implement their documented contracts. Check the chosen providers, scope changes and recovery flows on your server before enabling optional model mode.
Life Points
A permadeath layer. Each character starts at Config.LifePoints.StartingPoints (default 100, in server/config_server.lua). Deaths deduct points based on cause: DefaultPenalty, PlayerKillPenalty, per-NPC NPCOverrides, per-ExternalReasons (disease, bleedout, starvation, etc.), and per-weapon-class penalties. Points never drop below MinPoints. What happens there is set by Config.LifePoints.Recovery; when it is off, the life points stay at the minimum and other scripts can read them with GetLifePoints. State persists in the ml_lifepoints table.
Yes. Enable Config.LifePoints.Recovery in server/config_server.lua. The character then rests for Duration seconds: held in a hospital, sent back to character selection, or kicked, depending on Mode. The player can keep playing other characters. When the timer ends, life points go back to RestorePoints.
1Config.LifePoints.Recovery = {
2 Enabled = true,
3 Duration = 21600,
4 Mode = 'hospital',
5 CountOffline = true,
6 RestorePoints = 100,
7}The per-weapon-class penalties (WeaponPenalties) and the extra player-kill weapon penalties (PlayerKillWeapons) are balance numbers in the escrowed internal/balance/weapon_penalties.lua and cannot be edited. The editable Life Points settings in server/config_server.lua are: StartingPoints, MinPoints, DefaultPenalty, PlayerKillPenalty, NPCOverrides, ExternalReasons, StaffPermissions, and ExportAllowlist. Geographic death-zone penalties live in Config.LifePoints.Zones (shared/config/integrations.lua).
Roles in Config.LifePoints.StaffPermissions (default god, admin) revive without penalty and may call the modify exports. To restrict which resources may call SetLifePoints / AddLifePoints / RemoveLifePoints, populate Config.LifePoints.ExportAllowlist (empty = any server resource).
Integration
Configure Config.RadiationIntegration in shared/config/integrations.lua (poll interval, DiseaseName = 'radiazioni', CureThreshold, Thresholds, CureItems, anti-abuse EntryGrace and RequireAntidoteForCure). The script reads the radiation level from ml_radiation and drives the radiazioni disease when thresholds are crossed.
Config.ContactInfection (shared/config/integrations.lua) provides a contact-infection API that only runs when called. Defaults apply patogeno_vx_9 at 35% per contact. Call it server-side with exports.ml_healthsystem:InfectFromContact(src, opts) or client-side via TriggerServerEvent('ml_healthsystem:server:ContactInfection'): for zombie, hazard, or trap scripts.
Use the server export:
1exports.ml_healthsystem:SetDeathSystemDisabled(source, true)Death processing is suppressed for that player until re-enabled. Useful for admin godmode or cutscenes.
1local ok, reason = exports.ml_healthsystem:RevivePlayer(source, { ClearDiseases = false })ClearDiseases = false keeps diseases for this revive. Include only the fields to change; omitted fields inherit Config.ReviveSettings in server/config_server.lua. The global settings and the supplied table are not changed. The player is revived in place, with no hospital teleport, inventory wipe, or Life Points penalty. Alive players are also accepted. Use HospitalRespawn for the hospital flow.
To use the global revive settings, omit the table:
1local ok, reason = exports.ml_healthsystem:RevivePlayer(source)The target must be an online player with a positive integer server ID. Success returns true after the server reset and client event dispatch. Invalid targets return false, 'invalid_player'; invalid tables, unknown fields, or non-boolean values return false, 'invalid_options'. Both exports accept the eight reset fields documented in the Developer reference.
Call the server export after the NPC treatment progress completes and the server has validated treatment authorization, NPC proximity, payment, and any EMS availability rule:
1local ok, reason = exports.ml_healthsystem:HospitalRespawn(source, { ClearDiseases = false })ClearDiseases = false keeps diseases for this respawn. Omitted fields inherit Config.HospitalReset; the global configuration is not changed. All eight reset fields accept per-call boolean values: RestoreHealth, RestoreBlood, ResetBleeding, ClearInjuries, ClearFractures, ClearCasts, ClearDiseases, and ResetHungerThirst. Unknown keys or non-boolean values return false, 'invalid_options'.
The player must be dead or last_stand. The export bypasses the death timer and spawn selector and uses the normal hospital respawn flow, including inventory wipe and Life Points penalties when enabled. These two features still use their own global settings. A true result confirms the server reset and client event dispatch, not the end of the client animation.
When RestoreHealth = false, pre-reset health is preserved within 101 and Config.MaxHealth so the player can return alive. Preserved diseases, low blood volume, and bleeding still apply their normal effects and damage.
To select a configured hospital, pass its exact Config.StartSpawn key as the third argument:
1local ok, reason = exports.ml_healthsystem:HospitalRespawn(source, { ClearDiseases = false }, 'prison')Database
Three, all created automatically on first start:
ml_healthsystem: persisted per-character medical state (identifier,health_data).ml_lifepoints: Life Points balance per character.ml_health_tents: placed respawn tents.
Live in-session state (wounds, bleeding, diseases, death state) is synced in real time and is flushed to ml_healthsystem for persistence, there is no separate per-injury table.
Revive them with exports.ml_healthsystem:RevivePlayer(source) (server). For a full medical wipe, that export honors Config.ReviveSettings. The ml_healthsystem row is keyed by identifier; clearing it resets persisted state on the next load, but a live revive is the correct first step.
Updates
- Download the latest version from CFX Portal.
- Back up your config:
shared/config.lua,shared/config/*.lua,server/config_server.lua, and theopen/folder. - Replace all files except your config and
open/edits. - Restart the resource.
Medical state, Life Points, and tents live in the database (ml_healthsystem, ml_lifepoints, ml_health_tents) and survive updates.
The balance files (internal/balance/*.lua) are escrowed and ship inside the encrypted build, so there is nothing to back up or merge there, they are replaced wholesale on update. Your editable config (shared/config/*.lua, server/config_server.lua) and open/ changes are yours to preserve across updates.