> 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-v6/exports-events.md).

# Exports/Events

### Quick Reference

| Export                     | Returns   | Description               |
| -------------------------- | --------- | ------------------------- |
| `setDisplay`               | —         | Show / hide HUD           |
| `addNotification`          | —         | Show notification         |
| `Progress`                 | —         | Start progress bar        |
| `ProgressWithStartEvent`   | —         | Progress + start callback |
| `ProgressWithTickEvent`    | —         | Progress + tick callback  |
| `ProgressWithStartAndTick` | —         | Progress + start + tick   |
| `isDoingSomething`         | `boolean` | Is progress active        |

### HUD Visibility

#### `setDisplay`

Shows or hides the entire HUD.

```lua
exports['izzy-hudv6']:setDisplay(true)   -- show
exports['izzy-hudv6']:setDisplay(false)  -- hide
```

| Param   | Type      | Description                   |
| ------- | --------- | ----------------------------- |
| `state` | `boolean` | `true` = show, `false` = hide |

Alternative event:

```lua
TriggerEvent('izzy-hudv6:client:setDisplay', true)

-- Server → Client:
TriggerClientEvent('izzy-hudv6:client:setDisplay', source, false)
```

### Notifications

#### `addNotification`

Shows an in-HUD notification. Used in the QB `Notify` override from README.

```lua
exports['izzy-hudv6']:addNotification('success', 'Title', 'Message text', 5000)
exports['izzy-hudv6']:addNotification('error', 'Error', 'Something went wrong', 5000)
exports['izzy-hudv6']:addNotification('inform', 'Info', 'Message', 5000)
```

| Param      | Type     | Description                    |
| ---------- | -------- | ------------------------------ |
| `type`     | `string` | `success` · `error` · `inform` |
| `title`    | `string` | Notification title             |
| `message`  | `string` | Notification body              |
| `duration` | `number` | Duration in ms                 |

Config: `cfg.notifyStyle` (1/2/3), `cfg.notifyPosition` (`top-center`, etc.)

Alternative event:

```lua
TriggerEvent('izzy-hudv6:client:notification', 'success', 'Message', 5000)
```

### Progress Bar

QB `Progressbar` override uses this export. Supports animation and props.

#### `Progress`

```lua
exports['izzy-hudv6']:Progress({
    name = 'repair_vehicle',
    duration = 5000,
    label = 'Repairing...',
    description = 'Vehicle is being repaired',
    useWhileDead = false,
    canCancel = true,
    controlDisables = {
        disableMovement = false,
        disableCarMovement = false,
        disableMouse = false,
        disableCombat = true,
    },
    animation = {
        animDict = 'mini@repair',
        anim = 'fixing_a_player',
        flags = 49,
    },
    prop = {
        model = nil,
        bone = nil,
        coords = vec3(0.0, 0.0, 0.0),
        rotation = vec3(0.0, 0.0, 0.0),
    },
    propTwo = {
        model = nil,
        bone = nil,
        coords = vec3(0.0, 0.0, 0.0),
        rotation = vec3(0.0, 0.0, 0.0),
    },
}, function(cancelled)
    if not cancelled then
        -- success
    end
end)
```

| Field              | Type      | Default | Description          |
| ------------------ | --------- | ------- | -------------------- |
| `duration`         | `number`  | —       | Duration in ms       |
| `label`            | `string`  | —       | Progress title       |
| `description`      | `string`  | —       | Subtitle text        |
| `useWhileDead`     | `boolean` | `false` | Works while dead     |
| `canCancel`        | `boolean` | `true`  | Can be cancelled     |
| `controlDisables`  | `table`   | —       | Lock movement/combat |
| `animation`        | `table`   | —       | Play animation       |
| `prop` / `propTwo` | `table`   | —       | Attach props         |

Cancel:

* Key: `DELETE` (`cfg.cancelProgress.key`)
* Command: `/cancel` (`cfg.cancelProgress.command`)
* Event: `TriggerEvent('progressbar:client:cancel')`

Only one progress can run at a time.

***

#### `ProgressWithStartEvent`

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

#### `ProgressWithTickEvent`

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

#### `ProgressWithStartAndTick`

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

#### `isDoingSomething`

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

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

### Client Events (Integration)

#### Stress

Requires `cfg.useStress = true`.

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

#### Progress (qb-progressbar compatibility)

```lua
TriggerEvent('progressbar:client:progress', action, finishCallback)
TriggerEvent('progressbar:client:ProgressWithStartEvent', action, onStart, onFinish)
TriggerEvent('progressbar:client:ProgressWithTickEvent', action, onTick, onFinish)
TriggerEvent('progressbar:client:ProgressWithStartAndTick', action, onStart, onTick, onFinish)
TriggerEvent('progressbar:client:cancel')
```

#### Seatbelt

No export — use global `seatbeltOn` or keybind.

Default key: B (`toggleseatbelt`)

`-- seatbeltOn = true / false (global variable)`

### Commands (cfg.lua)

| Command         | Default  | Description           |
| --------------- | -------- | --------------------- |
| HUD settings    | `/hud`   | `cfg.settingsCommand` |
| Music panel     | `/music` | `cfg.musicCommand`    |
| NUI focus       | `/focus` | `cfg.focusCommand`    |
| Cancel progress | DELETE   | `/cancel`             |

### QB Override Examples (README)

Progressbar:

```lua
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
    exports['izzy-hudv6']:Progress({
        name = name:lower(),
        duration = duration,
        label = label,
        useWhileDead = useWhileDead,
        canCancel = canCancel,
        controlDisables = disableControls,
        animation = animation,
        prop = prop,
        propTwo = propTwo,
    }, function(cancelled)
        if not cancelled then onFinish() else onCancel() end
    end)
end
```

Notify:

```lua
function QBCore.Functions.Notify(text, texttype, length)
    exports['izzy-hudv6']:addNotification(
        texttype == 'success' and 'success' or texttype == 'error' and 'error' or 'inform',
        texttype == 'error' and 'Error' or texttype == 'success' and 'Success' or 'Notify',
        type(text) == 'table' and text.text or text,
        length or 5000
    )
end
```

### Open Source Files

Editable: `shared/cfg.lua`, `shared/shared.lua`, `shared/utils.lua`, `client/progress.lua`, `client/seatbelt.lua`, `client/stress.lua`. Main HUD loop is escrow (`client.lua` / `server.lua` not in workspace).


---

# 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-v6/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.
