> For the complete documentation index, see [llms.txt](https://daddy-studios.gitbook.io/daddy-studios-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-hud/exports.md).

# Exports

## Client

```lua
local hud = exports['daddy-hud']

hud:SetVisible(false)                 -- hide the HUD (cutscenes, menus)
hud:ToggleVisible()
hud:IsVisible()
hud:IsLoaded()
hud:OpenSettings()
hud:CloseSettings()
hud:EnterEditMode()
hud:Refresh()
hud:GetSnapshot()                     -- everything the HUD currently shows
hud:SetStyle(3, true)                 -- 1 body map, 3 ECG; true saves it for the player

hud:SetModuleValue('radiation', 45)   -- health, armor, hunger, thirst, stamina, radiation
hud:SetModuleValue('hunger', nil)     -- nil gives hunger/thirst/radiation back to the framework
hud:SetModuleVisible('hunger', true)
hud:ResetModuleOverride('hunger')
hud:GetModuleState('hunger')

hud:SetCinematicBars(true)
hud:ToggleCinematicBars()
hud:IsCinematicActive()
hud:SetCompassVisible(true)
hud:ToggleCompass()
hud:ResetCompassOverride()
hud:IsCompassVisible()
hud:SetAccentColor('#3FA7AD')
```

### Noise

```lua
hud:GetNoise()                                        -- { active, radius, source, level }
hud:SetNoise({ radius = 40, source = 'horn' }, 3000)  -- override for 3 seconds
hud:SetNoise(nil)                                     -- remove the override
```

Sources: `none`, `stealth`, `walk`, `run`, `jump`, `voice`, `shoot`, `shootSilenced`, `vehicle`, `motorcycle`, `bicycle`, `boat`, `helicopter`, `horn`, `crash`, `padMusic`.

### Health system

```lua
hud:GetHealthSystem()                     -- 'builtin', 'ml_healthsystem', 'gta' or 'external'
hud:GetBodyDamage()                       -- { head, thorax, leftArm, rightArm, leftLeg, rightLeg } 0-100
hud:GetInjuries()                         -- { { type, severity, bodyPart }, ... }
hud:ClearInjuries()
hud:StopBleeding()
hud:HealZone('leftLeg')                   -- builtin and external
hud:AddInjury('rightArm', 'CUT', 2, 30)   -- builtin: zone, type, severity 1-4, extra zone damage
```

### External health system

With `Config.HealthSystem = 'external'` the body map shows only what your scripts send:

```lua
hud:SetBodyDamage({ head = 0, thorax = 40, leftArm = 0, rightArm = 0, leftLeg = 75, rightLeg = 0 })
hud:SetInjuries({
    { type = 'GUNSHOT', severity = 3, bodyPart = 'leftLeg' },
    { type = 'FRACTURE', severity = 4, bodyPart = 'leftLeg' },
})
hud:SetBleeding(2)                -- 0-4
hud:SetDeathState('LAST_STAND')   -- ALIVE, LAST_STAND, DEAD
```

Injury types: `GUNSHOT`, `CUT`, `BLUNT_TRAUMA`, `BURN`, `FRACTURE`, `BLEEDING`, `WOUND_INFECTION`, `FOOD_POISONING`, `INFLUENZA`, `TETANUS`, `RADIATION_SICKNESS`, `VX9`, `HUNGER`, `THIRST`.

## Server

```lua
exports['daddy-hud']:SetVisible(source, false)
exports['daddy-hud']:Refresh(source)
exports['daddy-hud']:SetModuleValue(source, 'radiation', 30)
exports['daddy-hud']:ClearInjuries(source)
exports['daddy-hud']:StopBleeding(source)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-hud/exports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
