Configuration

23 min readUpdated 5 days ago

Overview

The config is split into one file per concern under shared/config/, plus a server-only file. There is no monolithic shared/config.lua table to edit, every value lives in its own file.

text
1shared/config/
2├── core.lua          # Debug, Locale, Theme, native regen toggle
3├── vitals.lua        # MaxHealth, Blood, Armor, Wound levels, BloodTrails, Casts
4├── bodyparts.lua     # Single table for the 9 body parts
5├── diseases.lua      # Disease definitions, stages, contagion, treatments
6├── items.lua         # Medical items + XP cooldown
7├── anim_presets.lua  # Reusable animation presets referenced by items
8├── masks.lua         # Masks (item + drawable) and clothing protection
9├── effects.lua       # Visual effects, Voice, Flare, Vehicle crash, NPC behavior
10├── fractures.lua     # Fall-fracture chance + per-part fracture penalties
11├── integrations.lua  # Radiation, contact infection, LifePoints zones
12├── item_diseases.lua # Food/item → disease map
13├── lifecycle.lua     # Last stand + Death
14├── respawn.lua       # Spawn points, cinematic cam, bed, respawn tent
15├── security.lua      # AntiBunnyHop (Enabled + Sensitivity preset)
16├── ui.lua            # Scan UI, Medic jobs, Commands
17└── open.lua          # Open-handler event toggles
18server/config_server.lua  # Webhooks, LifePoints, inventory wipe, revive/hospital reset
Escrowed balance numbers are not editable

internal/balance/*.lua is encrypted by the Cfx escrow and cannot be edited. It holds Config.Performance (tick intervals), Config.DamageControl (anti-exploit thresholds), Config.Blood.Probabilities / Config.Blood.Compatibility, the per-weapon LifePoints penalties, the AntiBunnyHop sensitivity presets, and the per-body-part balance numbers. internal/engine/*.lua (bone IDs, weapon hashes, cast prop offsets) is visible but is technical data, do not modify it. Everything documented below lives in shared/config/*.lua or server/config_server.lua and is freely editable.

Core

shared/config/core.lua
1Config.Debug              = false
2Config.Locale             = 'en'
3Config.Theme              = 'default'
4Config.DisableHealthRegen = true
  • Debug: enables console DebugLog output. Keep off in production.
  • Locale: language code. Default 'en'. Use any file present in the locales/ folder.
  • Theme: UI theme: default, cyberpunk, wasteland, noir, fantasy.
  • DisableHealthRegen: blocks GTA native health regeneration so wounds do not self-heal.

Vitals

shared/config/vitals.lua
1Config.MaxHealth            = 200
2Config.BleedRateMultiplier  = 0.5
3Config.ArmorDamageThreshold = 2
4
5Config.ArmorSettings = {
6    BleedReduction        = 0.80,
7    DamageReduction       = 0.20,
8    MinArmorForProtection = 5.0,
9}
10
11Config.Casts.Duration = 3600
  • MaxHealth: player max health ceiling (GTA caps usable health; 200 is the engine max).
  • BleedRateMultiplier: multiplier on blood lost per bleeding tick. 1.0 is the unscaled rate.
  • ArmorDamageThreshold: minimum incoming damage before armor degradation logic applies.
  • ArmorSettings.BleedReduction: fraction of bleed chance removed while armored.
  • ArmorSettings.DamageReduction: fraction of damage absorbed while armored.
  • ArmorSettings.MinArmorForProtection: minimum armor value before any protection counts.
  • Casts.Duration: fallback cast duration in seconds when a body part does not define its own. Per-part durations live in bodyparts.lua.

Blood

shared/config/vitals.lua
1Config.Blood.MaxVolume         = 6.0
2Config.Blood.WeaknessThreshold = 4.5
3Config.Blood.CriticalLevel     = 3.0
4Config.Blood.DeathThreshold    = 0.0
5Config.Blood.DrawAmount        = 0.25
6Config.Blood.RegenRate         = 0.05
7Config.Blood.RegenBoost        = 0.2
8Config.Blood.BleedingRates = {
9    [1] = 0.008,
10    [2] = 0.017,
11    [3] = 0.033,
12    [4] = 0.067,
13}
  • MaxVolume: maximum blood volume in liters.
  • WeaknessThreshold: below this liter level the player takes movement penalties.
  • CriticalLevel: below this level screen effects and severe debuffs apply.
  • DeathThreshold: blood level at which the player dies from blood loss.
  • DrawAmount: liters drawn per empty_syringe use.
  • RegenRate: liters regenerated per natural regen tick.
  • RegenBoost: liters regenerated per tick while a saline/regen buff is active.
  • BleedingRates: liters lost per tick at each bleeding level (1-4).
Blood types are escrowed

Blood-type probabilities and donor/receiver compatibility live in internal/balance/blood_groups.lua and cannot be edited. The defaults are O 45%, A 40%, B 11%, AB 4%, with O universal donor and AB universal receiver.

Wound levels and blood trails

shared/config/vitals.lua
1Config.WoundLevels = {
2    [1] = { movementRate = 0.98, label = 'Minor' },
3    [2] = { movementRate = 0.85, label = 'Painful' },
4    [3] = { movementRate = 0.72, label = 'Severe' },
5    [4] = { movementRate = 0.59, label = 'Critical' },
6}
7
8Config.BloodTrails = {
9    Enabled   = true,
10    Threshold = 2,
11}
  • WoundLevels[n].movementRate: movement-speed multiplier at each wound severity.
  • WoundLevels[n].label: name shown for that severity.
  • BloodTrails.Enabled: leave blood decals on the ground while bleeding.
  • BloodTrails.Threshold: minimum bleeding level (1-4) before trails start.

Body Parts

shared/config/bodyparts.lua
1Config.BodyParts = {
2    head = {
3        armored     = false,
4        canFracture = false,
5        fracture    = { allowShoot = true, allowDrive = true, allowSprint = true },
6    },
7    -- neck, chest, spine, pelvis, left_arm, right_arm, left_leg, right_leg ...
8}

A single table defines all 9 parts (head, neck, chest, spine, pelvis, left_arm, right_arm, left_leg, right_leg).

  • armored: whether worn armor reduces damage to this part.
  • canFracture: whether the part can fracture. Ships false on every part (fractures are disabled by default, see fractures.lua).
  • fracture.allowShoot / allowDrive / allowSprint: what the player may do while this part is fractured.
  • cast.duration: optional per-part cast duration (ms) overriding Config.Casts.Duration.
Per-part balance is escrowed

breakThreshold, fractureChance, staggerMult, and shakeIntensity for each part live in internal/balance/balance.lua and cannot be edited.

Lifecycle (Last Stand and Death)

shared/config/lifecycle.lua
1Config.LastStand = {
2    Duration             = 60,
3    InstantDeathOnDamage = false,
4    MinimumDamageToKill  = 50,
5    Anim = { dict = 'move_injured_ground', name = 'front_loop' },
6}
7
8Config.Death = {
9    Duration               = 600,
10    AutoRespawnOnZero      = false,
11    AutoRespawnGracePeriod = 600,
12    RespawnUITimeout       = 60,
13    Anim    = { dict = 'dead', name = 'dead_a' },
14    AnimVeh = { dict = 'veh@low@front_ps@idle_duck', name = 'sit' },
15}
  • LastStand.Duration: seconds in last stand before death.
  • LastStand.InstantDeathOnDamage: true kills immediately if damaged while downed.
  • LastStand.MinimumDamageToKill: damage needed to kill during last stand when InstantDeathOnDamage is false.
  • LastStand.Anim: downed ground animation dict/name.
  • Death.Duration: seconds before the respawn UI opens.
  • Death.AutoRespawnOnZero: auto-respawn when the timer reaches zero.
  • Death.AutoRespawnGracePeriod: when AutoRespawnOnZero is true, seconds the "Hold E" prompt stays open before a forced respawn. 0 or nil = instant auto-respawn with no prompt.
  • Death.RespawnUITimeout: seconds before the respawn UI auto-selects.
  • Death.Anim / Death.AnimVeh: death animation on foot / in a vehicle.

Effects

shared/config/effects.lua
1Config.Effects = {
2    CameraShake          = true,
3    ScreenEffects        = true,
4    WeaknessEffects      = true,
5    AimShake             = true,
6    ExternalRecoilScript = false,
7    FlashOnFracture      = true,
8    Blackout = {
9        Enabled     = true,
10        OnHeadShot  = true,
11        OnExplosion = true,
12        Chance      = 80,
13        Duration    = 4000,
14        MinDamage   = 20,
15    },
16}
  • CameraShake: camera shake on injury.
  • ScreenEffects: screen post-FX at critical blood levels.
  • WeaknessEffects: movement penalties at low blood.
  • AimShake: weapon sway while injured.
  • ExternalRecoilScript: set true when a standalone recoil script is present, to avoid conflicts.
  • FlashOnFracture: screen flash on fracture.
  • Blackout.Enabled: knockout on headshot/explosion.
  • Blackout.OnHeadShot / OnExplosion: which events can trigger a blackout.
  • Blackout.Chance: percent chance to trigger.
  • Blackout.Duration: blackout length in ms.
  • Blackout.MinDamage: minimum damage that can trigger a blackout.

NPC behavior and voice

shared/config/effects.lua
1Config.NPCInteraction = {
2    IgnoreOnDeath     = true,
3    IgnoreInLastStand = true,
4}
5
6Config.Voice = {
7    Enable        = true,
8    System        = 'pma-voice',
9    MuteDead      = true,
10    MuteLastStand = false,
11}
  • NPCInteraction.IgnoreOnDeath / IgnoreInLastStand: NPCs ignore the player while dead / downed.
  • Voice.Enable: enable voice muting integration.
  • Voice.System: voice resource name.
  • Voice.MuteDead: mute the player while dead.
  • Voice.MuteLastStand: mute the player while in last stand.

Flare

shared/config/effects.lua
1Config.Flare = {
2    Enabled      = true,
3    RequireItem  = true,
4    VisualEffect = true,
5    Item         = 'WEAPON_FLARE',
6    RemoveItem   = true,
7    Cooldown     = 60000,
8    Key          = 47,
9    AlertDispatch = {
10        Enabled = false,
11        Jobs    = { 'ambulance', 'police' },
12        Code    = '10-52',
13    },
14}
  • Enabled: allow downed players to fire a flare for help.
  • RequireItem: require the flare item to use it.
  • VisualEffect: fire the visual flare into the sky. Off sends the alert with no flare shot and the death-screen prompt becomes a plain call for help.
  • Item: inventory weapon key. WEAPON_FLARE is the base-game flare weapon (case-sensitive).
  • RemoveItem: consume the flare on use.
  • Cooldown: ms between flare uses.
  • Key: control index that fires the flare.
  • AlertDispatch.Enabled: alert police and medics through your dispatch when a downed player uses the flare.
  • AlertDispatch.Jobs: jobs that receive the call.
  • AlertDispatch.Code: dispatch code sent with the alert.
  • VisualEffect and AlertDispatch both off hide the signal prompt on the death screen.

Vehicle crash

shared/config/effects.lua
1Config.VehicleCrash = {
2    Enabled = true,
3    Tiers = {
4        { minSpeed = 100.0, damage = 15, bleedChance = 10, fractureChance = 0, stagger = true  },
5        { minSpeed = 70.0,  damage = 7,  bleedChance = 5,  fractureChance = 0, stagger = false },
6        { minSpeed = 40.0,  damage = 3,  bleedChance = 0,  fractureChance = 0, stagger = false },
7    },
8}
  • Enabled: apply crash injuries from high-speed impacts.
  • Tiers[n].minSpeed: speed threshold for the tier.
  • Tiers[n].damage: health damage applied.
  • Tiers[n].bleedChance / fractureChance: percent chance to start bleeding / fracture.
  • Tiers[n].stagger: whether the impact staggers the player.

Defaults are deliberately low to avoid random deaths from minor crashes.

Security (Anti-Bunny Hop)

shared/config/security.lua
1Config.AntiBunnyHop = {
2    Enabled     = true,
3    Sensitivity = 'medium',
4    Notify      = true,
5    Message     = "Slow down! Don't jump so often.",
6}
  • Enabled: toggle the anti-bunny-hop ragdoll.
  • Sensitivity: preset: low (only extreme hops), medium (recommended), high (aggressive), extreme (ragdoll almost always).
  • Notify: show a notification on a violation.
  • Message: notification text.
Sensitivity presets are escrowed

The concrete cooldown, ragdoll duration, and trigger chance behind each preset live in internal/balance/antibunnyhop.lua and cannot be edited. Pick a preset; the numbers are fixed.

Fractures

shared/config/fractures.lua
1Config.Fractures = {
2    enabled = false,
3    Legs = {
4        FallOnlyRunning  = true,
5        FallChanceRun    = 10,
6        FallChanceSprint = 15,
7        FallChanceWalk   = 5,
8    },
9}
  • enabled: master kill switch. Ships false. Re-enabling also requires setting canFracture = true on the desired parts in bodyparts.lua.
  • Legs.FallOnlyRunning: only count fall fractures while moving.
  • Legs.FallChanceRun / FallChanceSprint / FallChanceWalk: percent chance of a leg fracture from a fall at each movement state.
shared/config/fractures.lua
1Config.FracturePenalties = {
2    ['left_arm']  = { allowShoot = true,  aimShake = true, shakeIntensity = 2.5 },
3    ['right_arm'] = { allowShoot = false, allowDrive = true },
4    ['left_leg']  = { limp = true, sprint = false, allowDrive = true },
5    ['right_leg'] = { limp = true, sprint = false, allowDrive = false },
6    -- head, neck, chest, spine, pelvis ...
7}

Config.FracturePenalties defines, per body part, what a fracture restricts:

  • allowShoot: whether the player can shoot with this part fractured.
  • allowDrive: whether the player can drive.
  • aimShake / shakeIntensity: add aim sway and how strong it is.
  • limp / sprint: apply a limp / block sprint.

Masks

shared/config/masks.lua
1Config.MaskSystem = {
2    EnableItemMode     = true,
3    EnableClothingMode = true,
4    Anim = {
5        dict    = 'mp_masks@on_foot',
6        putOn   = 'put_on_mask',
7        takeOff = 'put_on_mask',
8        flags   = 49,
9    },
10}
11
12Config.Masks = {
13    ['mask_surgical']    = { protection = 90,  component = { id = 7, male = 38,  female = 38,  texture = 0 }, label = 'Surgical Mask' },
14    ['mask_n95']         = { protection = 99,  component = { id = 7, male = 120, female = 120, texture = 0 }, label = 'N95 Mask' },
15    ['mask_dust_unisex'] = { protection = 30,  component = { id = 7, male = 46,  female = nil, texture = 0 }, label = 'Dust Mask',   itemless = true },
16    ['helmet_full_male'] = { protection = 100, component = { id = 1, male = 36,  female = 36,  texture = 0 }, label = 'Full Helmet', itemless = true },
17    ['helmet_half_male'] = { protection = 50,  component = { id = 1, male = 46,  female = nil, texture = 0 }, label = 'Half Helmet', itemless = true },
18}
  • MaskSystem.EnableItemMode: mask items from inventory grant disease protection.
  • MaskSystem.EnableClothingMode: worn clothing components grant protection.
  • MaskSystem.Anim: put-on / take-off animation.
  • Config.Masks: single source of truth for masks. Config.MaskItems (per-item lookup) and the mask entries in Config.ProtectiveClothing are derived from this table at runtime.

- protection: filtering percentage (0-100).

- component: clothing slot { id, male, female, texture }. Set female = nil if the drawable is male-only.

- label: display name.

- itemless: true means protection comes from the worn drawable only, with no dedicated inventory item.

Config.ProtectiveClothing (also in masks.lua) maps individual male/female drawable IDs for component slot [1] to a protection value (40 or 80), letting plain clothing offer partial protection without a mask item.

Add a mask in one place

Add or edit an entry in Config.Masks only. The item lookup and the clothing check are generated from it, no need to edit three tables. These are shipped defaults, not fixed values; add, remove, or rebalance them freely.

Diseases

Diseases live in shared/config/diseases.lua. They are shipped defaults, add, remove, or rebalance them freely. Each disease defines:

  • severity: mild, moderate, severe, or critical.
  • contagious: enabled, distance, chance, interval, useMasks.
  • trigger: optional auto-infect on injury (type = 'injury', parts, chance).
  • stages: timed progression; each stage has after, name, and an effects list.
  • treatment: cure item, optional maxCurableStage, tooLateMessage, suppressors, naturalRecovery.

The six shipped diseases:

  • influenza (Viral Flu), mild, contagious, 4 stages. Cure: paracetamol. Suppressors: vitalex, vitamin_cocktail.
  • patogeno_vx_9 (VX-9 Pathogen), critical, 5 stages (stage 5 terminal). Cure: retroxin (max curable stage 4).
  • radiazioni (Radiation Sickness), severe, 4 stages (stage 4 terminal). Cure: radiation_antidote (max curable stage 3). Wired to the radiation integration.
  • infezione (Wound Infection), moderate, triggered by cut/gunshot injuries (30%), 5 stages (stage 5 terminal). Cure: antibiotics.
  • intossicazione (Food Poisoning), mild, 3 stages with natural recovery. Cure: herbal_infusion.
  • tetano (Tetanus), severe, triggered by cut injuries (25%), 4 stages (stage 4 terminal). Cure: antibiotics.

Effect types usable in a stage: cough, stumble, damage, bleed, fever, movePenalty, vomit, lastStand, death, notify. Time format: '30s', '15m', '2h', '1d'. Add terminal = true to a stage to make it fatal.

Kill switch

shared/config/diseases.lua
1Config.DiseasesEnabled = true
2Config.AlwaysEnabledDiseases = {
3    'radiazioni',
4}
  • DiseasesEnabled: false disables every disease except those in AlwaysEnabledDiseases.
  • AlwaysEnabledDiseases: diseases that survive the kill switch. Keep radiazioni while the radiation integration is on, otherwise its silent terminal progression can cause "random" deaths.

Add an entry to Config.Diseases in shared/config/diseases.lua:

shared/config/diseases.lua
1['my_disease'] = {
2    label = 'My Disease',
3    icon = 'fa-virus',
4    severity = 'moderate',
5    contagious = { enabled = false },
6    stages = {
7        [1] = { after = '0s',  name = 'disease_my_disease_s1', effects = {} },
8        [2] = { after = '30m', name = 'disease_my_disease_s2', effects = {
9            { type = 'damage', amount = 2, interval = '10m' },
10            { type = 'notify', message = 'disease_my_disease_s2_msg' },
11        }},
12    },
13    treatment = {
14        cure = 'antibiotics',
15    },
16}

name and notify message fields are locale keys. Add the matching keys to every file in locales/: a missing key renders on screen as the literal MISSING: key, not a fallback. The cure item must exist in items.lua with type = 'cure_disease' and disease = 'my_disease'.

Item-triggered diseases

shared/config/item_diseases.lua
1Config.ItemDiseases = {
2    ['cibo_marcio'] = { disease = 'intossicazione', chance = 100 },
3    ['carne_rossa'] = { disease = 'intossicazione', chance = 50 },
4    ['carne_squalo'] = { disease = 'intossicazione', chance = 30 },
5    -- ...
6}

Maps inventory items (raw meat, spoiled food, undercooked fish) to a disease applied on consumption. disease must exist in diseases.lua; chance is rolled per use (0-100). The shipped entries map to intossicazione. Edit freely to match your server's food items.

Medical Items

Items live in shared/config/items.lua under Config.MedicalItems. The resource ships 28 medical items plus the respawn_tent. Item keys are English and must match the ox_inventory entries in _INSTALL/ox_items.txt exactly.

shared/config/items.lua
1Config.XpCooldownSeconds = 1800
2
3Config.MedicalItems = {
4    ['field_dressing'] = {
5        quickAccess = true,
6        type        = 'heal_wound',
7        allowSelf   = true,
8        remove      = true,
9        target      = { 'cut', 'gunshot' },
10        amount      = 1,
11        health      = 20,
12        anim        = 'bandage_shirt',
13        duration    = 13000,
14        xp          = { medico = 5 },
15        client = { labelKey = 'item_field_dressing', descKey = 'item_field_dressing_desc', icon = 'bandage' },
16    },
17    -- ...
18}
  • Config.XpCooldownSeconds: seconds between XP awards on the same (healer, patient, treatmentType) tuple. Treatment still applies during cooldown; only the XP is suppressed. 0 disables the anti-grind. Default 1800.

Per-item fields:

  • type: action: heal_wound, fix_fracture, revive_player, cure_disease, boost_regen, draw_blood, transfuse_blood, relieve_pain.
  • allowSelf: usable on self.
  • remove: consumed on use. false with durabilityLoss + removeWhen0 makes a reusable item (the defibrillator).
  • quickAccess: appears in the quick-access panel.
  • target: wound types (cut, gunshot, blunt, burn) or body parts the item treats.
  • amount / health / stopBleeding: wound severity reduced, health restored, and bleed-stop strength.
  • job: restricts use to a job (most advanced items require medico).
  • disease: for cure_disease, the disease(s) cured.
  • anim: references a preset in anim_presets.lua (syringe, pill, bandage, cast_anim, cpr, bandage_shirt, medkit, pill_capsule, bottle_herbal, bottle_pills, syringe_morphine).
  • animSelf / animTarget: explicit animations override the preset.
  • xp: XP awarded per category on a real success, integrating with ml_skills (e.g. { medico = 10 }). Self-treatments grant nothing.
  • requiredSkill: lock the item until the player has unlocked a specific ml_skills skill. Needs Config.Skills.Enabled. Always set category: it lets the client block the item before the use animation and hide it from the medic panel.
  • requiredLevel: lock the item below a minimum ml_skills category level. Combine with requiredSkill; both must pass.
  • client: labelKey, descKey (locale keys) and icon.

The shipped items, grouped by purpose:

  • Bandages / dressings: crafted_gauze, field_dressing, elastic_bandage, packing_bandage, ifak, surgical_kit, improvised_tourniquet, tourniquet, suture_kit
  • Casts: arm_cast, leg_cast, neck_brace, body_cast
  • Disease cures: retroxin, herbal_infusion, paracetamol, radiation_antidote, antibiotics, vitalex, vitamin_cocktail
  • Pain relief: painkillers, morphine
  • Blood: empty_syringe, blood_bag_500, saline_500
  • Revival: revive_kit, ecg (defibrillator, reusable), epinephrine
  • Survival: respawn_tent
Quick access

Items with quickAccess = true appear in the HUD quick bar for fast use during combat.

Skill lock (ml_skills)

With ml_skills installed, an item can require an unlocked skill or a category level before it is usable. Locked items are stopped before the use animation starts and the message names the missing skill. The rule is enforced server-side and fails open, so a stopped ml_skills never locks players out of medical gear.

shared/config/items.lua
1Config.Skills = {
2    Enabled         = false,
3    FailOpen        = true,
4    XpOnSelfUse     = false,
5    HideLockedItems = false,
6}
7
8-- per item, both optional:
9['surgical_kit'] = {
10    -- ...
11    requiredSkill = { category = 'medico', skill = 'first_aid' },
12    requiredLevel = { category = 'medico', level = 5 },
13}
  • Enabled: turn the skill lock on. Off leaves every item usable (default).
  • FailOpen: if ml_skills is stopped or errors, allow the item anyway.
  • XpOnSelfUse: also grant item-use XP when a player treats themselves.
  • HideLockedItems: hide locked items from the medic panel. Off (default) keeps them listed and blocks them on use.

Respawn

shared/config/respawn.lua
1Config.RespawnSettings = {
2    UISelection   = true,
3    GTAcam        = true,
4    ShowAllSpawns = true,
5    RandomSpawn   = false,
6    FallbackSpawn = vector4(1651.01, 2543.6, 45.56, 53.03),
7    CinematicCam  = true,
8}
  • UISelection: show the spawn-selection UI on death.
  • GTAcam: use the GTA selection camera.
  • ShowAllSpawns: show all spawn points instead of only the nearest.
  • RandomSpawn: pick a random spawn instead of showing the UI.
  • FallbackSpawn: fallback respawn coord. Replace the example with one valid on your map.
  • CinematicCam: enable the cinematic fly-in camera.

Config.StartSpawn defines named spawn groups, each with a label, center, and a list of spawns. The shipped entry (prigione, "Prison") is an example, replace its coordinates with your own hospitals or safe zones.

Bed respawn (hrs_base_building)

shared/config/respawn.lua
1Config.HrsBase = {
2    Enable          = true,
3    UseCinematicCam = false,
4    Anim = {
5        dict     = 'switch@trevor@bed',
6        name     = 'trevor_bed_exit_f_trevor',
7        duration = 8000,
8        blendIn  = 8.0,
9        blendOut = -8.0,
10    },
11}
  • Enable: offer "respawn in your own bed" when hrs_base_building is running. The option is gated by GetResourceState, so it is safe to leave enabled without the addon.
  • UseCinematicCam: cinematic camera on bed respawn.
  • Anim: bed exit animation. Config.HrsBase.PropSettings defines per-prop zOffset / headingOffset.

Respawn tent

shared/config/respawn.lua
1Config.RespawnTent = {
2    Enabled             = true,
3    Item                = 'respawn_tent',
4    Model               = `prop_skid_tent_01`,
5    MaxPerPlayer        = 2,
6    PlacementRange      = 50.0,
7    InteractionDistance = 2.5,
8    SpawnLOD            = 200.0,
9    Permissions = {
10        Pickup  = 'owner',
11        Destroy = 'all',
12    },
13    Placement = {
14        RayCastDistance = 10.0,
15        Anim = { dict = 'anim@narcotics@trash', name = 'drop_front', duration = 3000 },
16    },
17    SpawnOffset = vec3(0.0, 1.5, 1.0),
18}
  • Enabled: false fully disables the tent feature.
  • Item: inventory item that starts placement (respawn_tent).
  • Model: tent prop. prop_skid_tent_01 is a base-game GTA prop, no stream needed.
  • MaxPerPlayer: maximum active tents per player.
  • PlacementRange: max placement distance (m) and minimum distance between two tents.
  • InteractionDistance: distance (m) the target menu appears at.
  • SpawnLOD: distance (m) within which the prop renders.
  • Permissions.Pickup / Destroy: 'owner' (only owner) or 'all' (anyone nearby). Pickup returns the item; destroy does not.
  • Placement.RayCastDistance: aim range (m).
  • Placement.Anim: placement confirmation animation and progress-bar duration.
  • SpawnOffset: respawn offset from the tent so the player does not spawn inside the prop.

Placed tents persist in the ml_health_tents table, created automatically.

UI, Medic Jobs, Commands

shared/config/ui.lua
1Config.MedicJobs = {
2    'medico',
3}
4
5Config.SelfAlwaysAdvanced = false
6
7Config.ScanUI = {
8    Mode               = 'modern',
9    DragSensitivity    = 1.0,
10    CloseUpOnSelect    = true,
11    IntroDuration      = 800,
12    RevealMissingItems = true,
13}
14
15Config.Commands = {
16    Revive       = 'revive',
17    ReviveRadius = 'reviveall',
18    Debug        = 'meddebug',
19}
  • MedicJobs: jobs that get full medical info (exact BPM, blood liters, blood type, numeric severity, disease names). Non-medics see vague symptoms. Empty {} disables gating (everyone sees everything).
  • SelfAlwaysAdvanced: true gives every player full self-diagnosis even when not a medic.
  • ScanUI.Mode: 'modern' (body labels + orbital camera) or 'classic' (2D grid).
  • ScanUI.DragSensitivity: mouse drag sensitivity when rotating the camera.
  • ScanUI.CloseUpOnSelect: cinematic zoom when a body part is clicked.
  • ScanUI.IntroDuration: open-animation duration in ms (0 instant).
  • ScanUI.RevealMissingItems: true shows valid-but-unowned items grayed out with a "MISSING" badge; false shows only owned items.
  • Commands.Revive / ReviveRadius / Debug: command names. Defaults are /revive, /reviveall, /meddebug.

Integrations

shared/config/integrations.lua
1Config.RadiationIntegration = {
2    Enabled                = true,
3    PollInterval           = 5000,
4    DiseaseName            = 'radiazioni',
5    CureThreshold          = 2.0,
6    EntryGrace             = { Enabled = true, Duration = 15000, MaxRadiation = 15 },
7    RequireAntidoteForCure = true,
8    Thresholds = {
9        { level = 5,    action = 'infect' },
10        { level = 250,  action = 'accelerate', speedMult = 2 },
11        { level = 650,  action = 'escalade',   forceStage = 3 },
12        { level = 1000, action = 'escalade',   forceStage = 4 },
13    },
14    CureItems = {
15        ['radiation_antidote'] = 'all',
16    },
17}
  • Enabled: connect to ml_radiation.
  • PollInterval: ms between radiation polls.
  • DiseaseName: disease applied (radiazioni).
  • CureThreshold: radiation level below which the disease may auto-cure.
  • EntryGrace: grace window on zone entry (Duration ms, MaxRadiation) before infect/accelerate/escalade fires.
  • RequireAntidoteForCure: true blocks natural-decay auto-cure; only the antidote cleans the player.
  • Thresholds: radiation levels that infect, accelerate (with speedMult), or escalade (with forceStage).
  • CureItems: items that also remove radiation. 'all' clears it fully (recommended so the player is not re-infected on the next poll).
shared/config/integrations.lua
1Config.ContactInfection = {
2    Enabled        = true,
3    Disease        = 'patogeno_vx_9',
4    Chance         = 35,
5    SignalCooldown = 1000,
6}
  • Enabled: master toggle for the contact-infection API. Inert until an external script calls it, so it is safe to ship enabled.
  • Disease: disease applied on contact (must exist in diseases.lua).
  • Chance: percent chance per contact.
  • SignalCooldown: minimum ms between client contact signals (anti-spam).
shared/config/integrations.lua
1Config.LifePoints.Zones = {
2    -- ['nuclear_plant'] = {
3    --     type = 'sphere', coords = vec3(2700.0, 1500.0, 30.0),
4    --     radius = 200.0, penalty = 25, label = 'Nuclear Plant',
5    -- },
6}

Geographic zones that apply an extra LifePoints penalty on death inside them. Each zone is type = 'sphere' (coords + radius) or type = 'poly' (points + thickness), plus a required penalty and a label. Ships empty (commented examples only).

Open-Handler Events

shared/config/open.lua
1Config.OpenHandlers = {
2    EnableDeathEvent     = true,
3    EnableLastStandEvent = true,
4    EnableRespawnEvent   = true,
5}
  • EnableDeathEvent: fire ml_healthsystem:onPlayerDeath.
  • EnableLastStandEvent: fire ml_healthsystem:onPlayerLastStand.
  • EnableRespawnEvent: fire ml_healthsystem:onPlayerRespawned.

These hooks let the editable open/ scripts react to lifecycle events.

Server Config

server/config_server.lua holds the server-only values: webhooks, LifePoints, inventory wipe, and reset behavior. A reference copy ships as _INSTALL/config_server.example.lua.

Discord webhooks

server/config_server.lua
1Config.Log = {
2    AdminRevive     = 'INSERT_WEBHOOK_LINK_HERE',
3    AdminAction     = 'INSERT_WEBHOOK_LINK_HERE',
4    PlayerDeath     = 'INSERT_WEBHOOK_LINK_HERE',
5    PlayerRevive    = 'INSERT_WEBHOOK_LINK_HERE',
6    ItemUsed        = 'INSERT_WEBHOOK_LINK_HERE',
7    Treatment       = 'INSERT_WEBHOOK_LINK_HERE',
8    Disease         = 'INSERT_WEBHOOK_LINK_HERE',
9    Injury          = 'INSERT_WEBHOOK_LINK_HERE',
10    ExploitDetected = 'INSERT_WEBHOOK_LINK_HERE',
11    LifePoints      = 'INSERT_WEBHOOK_LINK_HERE',
12}

Each key logs one event category. Replace the placeholder with a webhook URL to enable that log; leave the placeholder (or set false) to disable it.

Life Points

server/config_server.lua
1Config.LifePoints.Enabled        = true
2Config.LifePoints.StartingPoints = 100
3Config.LifePoints.MinPoints      = 0
4Config.LifePoints.DefaultPenalty = 10
5Config.LifePoints.PlayerKillPenalty = 3
6
7Config.LifePoints.NPCOverrides = {
8    [`Lurker`] = 7,
9    [`Gasbag`] = 7,
10    -- ...
11}
12
13Config.LifePoints.ExternalReasons = {
14    ['radiazioni']    = 9,
15    ['infezione']     = 5,
16    ['patogeno_vx_9'] = 7,
17    ['bleedout']      = 5,
18    ['starvation']    = 2,
19    ['dehydration']   = 2,
20    ['overdose']      = 5,
21}
22
23Config.LifePoints.StaffPermissions = {
24    'god',
25    'admin',
26}
27
28Config.LifePoints.ExportAllowlist = {}
  • Enabled: toggle the LifePoints system.
  • StartingPoints: points each character starts with.
  • MinPoints: floor (points cannot drop below this).
  • DefaultPenalty: points lost per death without a more specific rule.
  • PlayerKillPenalty: points lost when killed by another player.
  • NPCOverrides: per-NPC-model penalty overrides (hashed model names).
  • ExternalReasons: penalties for non-combat death causes.
  • StaffPermissions: ACE / framework group names exempt from penalties and allowed to call the modify exports.
  • ExportAllowlist: resources permitted to call Set/Add/RemoveLifePoints. Empty allows any server resource (still blocks non-staff player context); populate to restrict.
Per-weapon penalties are escrowed

Config.LifePoints.PlayerKillWeapons and per-weapon penalty values live in internal/balance/weapon_penalties.lua and cannot be edited.

Inventory wipe

server/config_server.lua
1Config.InventoryWipe = {
2    Enabled = true,
3    Whitelist = {
4        ['water']          = true,
5        ['id_card']        = true,
6        ['driver_license'] = true,
7        ['money']          = true,
8        ['phone']          = true,
9        -- ... blueprints, weapons, medical, food, clothing
10    },
11}
  • Enabled: wipe non-whitelisted inventory on respawn.
  • Whitelist: items kept on respawn; everything else is removed. The shipped list is a survival-server example, replace it with your server's protected items (IDs, licenses, owned weapons, blueprints).

Revive and hospital reset

server/config_server.lua
1Config.ReviveSettings = {
2    RestoreHealth     = true,
3    RestoreBlood      = true,
4    ResetBleeding     = true,
5    ClearInjuries     = true,
6    ClearFractures    = true,
7    ClearCasts        = true,
8    ClearDiseases     = true,
9    ResetHungerThirst = true,
10}
11
12Config.HospitalReset = {
13    RestoreHealth     = true,
14    RestoreBlood      = true,
15    ResetBleeding     = true,
16    ClearInjuries     = true,
17    ClearFractures    = true,
18    ClearCasts        = true,
19    ClearDiseases     = true,
20    ResetHungerThirst = true,
21}
  • ReviveSettings: applied on an admin or export revive.
  • HospitalReset: applied on hospital/safe-zone respawn after death.

Set ClearFractures / ClearCasts / ClearDiseases to false for a realistic flow where the hospital only patches wounds and a real medic must apply casts and antibiotics.

Fracture/injury reset interaction

ClearFractures = false with ClearInjuries = true causes a "ped slow after respawn / cannot sprint" bug because the leg fracture activates the limp clipset. Keep ClearFractures = true unless your medical workflow applies a cast post-respawn.

Database Tables

The resource creates three tables automatically on first start (no manual SQL):

  • ml_healthsystem: persisted per-character medical state (identifier, health_data LONGTEXT). Live in-session state runs on live states; this table is the save/load snapshot.
  • ml_health_tents: placed respawn tents bound to their owner.
  • ml_lifepoints: per-character life points.