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

# Exports/Events

{% hint style="info" %}
Note: Code comments reference `izzy-hud`; use `izzy-hudv7` for exports and `ensure`. Event prefix: `izzy-hud:client:...`
{% endhint %}

### Quick Reference

| Export                        | Returns           | Description                   |
| ----------------------------- | ----------------- | ----------------------------- |
| `hudIsReady`                  | `boolean`         | Is HUD loaded                 |
| `getHUDVariables`             | `table \| string` | Full HUD state                |
| `notify`                      | —                 | Show notification             |
| `hideHUD`                     | —                 | Hide HUD                      |
| `showHUD`                     | —                 | Show HUD                      |
| `restartHUD`                  | —                 | Restart HUD                   |
| `ToggleSpeedometer`           | —                 | Toggle speedometer            |
| `ToggleHelicopterSpeedometer` | —                 | Toggle helicopter speedometer |
| `ToggleTopInformation`        | —                 | Toggle top info bar           |
| `OpenSettingPanel`            | —                 | Open settings panel           |
| `ToggleStatus`                | —                 | Toggle status bars            |
| `ToggleMap`                   | —                 | Toggle minimap                |
| `getSeatbeltState`            | `boolean`         | Seatbelt state                |
| `Progress`                    | —                 | Progress bar                  |
| `ProgressWithStartEvent`      | —                 | Progress + start callback     |
| `ProgressWithTickEvent`       | —                 | Progress + tick callback      |
| `ProgressWithStartAndTick`    | —                 | Progress + start + tick       |
| `isDoingSomething`            | `boolean`         | Is progress active            |

### Core

#### `hudIsReady`

```luau
local ready = exports['izzy-hudv7']:hudIsReady()
```

Returns: `boolean` — `HUD.loaded` state

#### `getHUDVariables`

```lua
local hud = exports['izzy-hudv7']:getHUDVariables()
```

Returns:

* `table` — HUD state (`loaded`, `speedType`, `inVehicle`, `weapon`, `mapVisible`, `activeStatus`, etc.)
* `'not loaded'` — HUD is not ready yet

Example fields:

```lua
{
    showWeapon = false,
    speedType = "MPH",
    loaded = true,
    pauseMenuOpen = false,
    compassVisible = false,
    settingIsOpen = false,
    weapon = { label = "", clip = 0, ammo = 0, image = "" },
    inVehicle = false,
    activeStatus = 9,
    mapVisible = "incar",
    mapStyle = "squared"
}
```

#### `showHUD` / `hideHUD` / `restartHUD`

```lua
exports['izzy-hudv7']:hideHUD()
-- cutscene / menu
exports['izzy-hudv7']:showHUD()

exports['izzy-hudv7']:restartHUD() -- waits 500ms then reopens
```

### Notifications

#### `notify`

```lua
exports['izzy-hudv7']:notify({
    message  = 'Your message here',
    type     = 'success', -- success | error | info | warning
    duration = 5000
})
```

Server-side alternative:

```lua
IZZY.Notification('Message', 'success', 5000, source)
-- Triggers: izzy-hud:client:notify
```

### Toggle Exports

#### `ToggleSpeedometer`

```lua
exports['izzy-hudv7']:ToggleSpeedometer()
```

Toggles speedometer visibility.

#### `ToggleHelicopterSpeedometer`

```lua
exports['izzy-hudv7']:ToggleHelicopterSpeedometer()
```

Toggles helicopter speedometer visibility. (v7 only)

#### `ToggleTopInformation`

```lua
exports['izzy-hudv7']:ToggleTopInformation()
```

Toggles the top info bar (cash, bank, job, logo, etc.).

#### `ToggleStatus`

```lua
exports['izzy-hudv7']:ToggleStatus()
```

Toggles status bars (health, armor, hunger, thirst).

#### `ToggleMap`

```lua
exports['izzy-hudv7']:ToggleMap()
```

Toggles minimap visibility (`DisplayRadar`).

#### `OpenSettingPanel`

```lua
exports['izzy-hudv7']:OpenSettingPanel()
```

Opens the HUD settings menu and sets NUI focus.

Alternative command: `/hud` (`IZZY.HudSettingsCommand`)

### Seatbelt

#### `etSeatbeltState`

```lua
local beltOn = exports['izzy-hudv7']:getSeatbeltState()
```

Returns: `boolean` — is seatbelt on

Note: Requires `IZZY.Seatbelt.enable = true`. Set to `false` if you use your own seatbelt script.

Alternatives:

```lua
TriggerEvent('seatbelt:client:ToggleSeatbelt')
-- Command: hud_seatbelt (default key B)
```

### Progress Bar

Defined in escrow `client/progressBar.lua`; documented in `exports.lua`:

#### `Progress`

```lua
exports['izzy-hudv7']:Progress({
    name = 'random_task',
    duration = 5000,
    label = 'Doing something',
    useWhileDead = false,
    canCancel = true,
    controlDisables = {
        disableMovement = false,
        disableCarMovement = false,
        disableMouse = false,
        disableCombat = true,
    },
    animation = {
        animDict = 'mp_suicide',
        anim = 'pill',
        flags = 49,
    },
    prop = {},
    propTwo = {},
}, function(cancelled)
    if not cancelled then
        -- success
    end
end)
```

Cancel:

* Key: `X` (`IZZY.Progress.CancelKeyMapping`)
* Command: `/hud_cancel_progress`

#### `ProgressWithStartEvent`

```lua
exports['izzy-hudv7']:ProgressWithStartEvent(action, onStart, onFinish)
```

#### `ProgressWithTickEvent`

```lua
exports['izzy-hudv7']:ProgressWithTickEvent(action, onTick, onFinish)
```

#### `ProgressWithStartAndTick`

```lua
exports['izzy-hudv7']:ProgressWithStartAndTick(action, onStart, onTick, onFinish)
```

#### `isDoingSomething`

```lua
local busy = exports['izzy-hudv7']:isDoingSomething()
```

Returns: `boolean` — is a progress bar currently active

### Events (instead of exports)

#### Change HUD style

```lua
-- Status style (1–18)
TriggerEvent('izzy-hud:client:ChangeStatus', 1)

-- Speedometer style (1–12)
TriggerEvent('izzy-hud:client:ChangeSpeedometer', 1)
```

#### Stress

Requires `IZZY.Stress.useStress = true`.

```lua
TriggerEvent('izzy-hud:client:gainStress', 3)
TriggerEvent('izzy-hud:client:relieveStress', 2)
TriggerEvent('izzy-hud:client:updateStress', 50)
```

### Commands (config.lua)

| Command         | Default  | Description                  |
| --------------- | -------- | ---------------------------- |
| HUD settings    | `/hud`   | `IZZY.HudSettingsCommand`    |
| Music panel     | `/music` | `IZZY.OpenMusicPanelCommand` |
| Seatbelt        | B        | `hud_seatbelt`               |
| Cancel progress | X        | `/hud_cancel_progress`       |

### v7 Highlights

| Feature                           | v7                              |
| --------------------------------- | ------------------------------- |
| Helicopter speedometer toggle     | ✅ `ToggleHelicopterSpeedometer` |
| Config prefix                     | `IZZY.*`                        |
| Event prefix                      | `izzy-hud:` (not v7)            |
| Manual framework selection        | `newqb`, `esx`, etc.            |
| ox\_lib                           | Required                        |
| 18 status + 12 speedometer styles | ✅                               |
| Music player                      | ✅ (`IZZY.Music`)                |
| Mileage saving                    | ✅ (`saveMileage`)               |

### Open Source Files

Editable files: `config.lua`, `client/exports.lua`, `client/seatbelt.lua`, `client/stress.lua`. Main loop is escrow (`client/main.lua`, `client/progressBar.lua`, etc.).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://izzyshop-1.gitbook.io/izzyshop-docs/hud-resources/hud-v7/exports-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
