> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoscripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exports

> Client and server exports and events for integrating Revo HUD with other resources.

> [!NOTE]
>
> Most exports are **client-side** and are called from a client script. The nitrous management exports and the notification event at the end are **server-side**.

## Notifications

Send a notification in the HUD's style from any client script:

```lua theme={null}
exports['revo_hud']:Notify('Title', 'Message', 'success', 5000)
TriggerEvent('revo_hud:notify', 'Title', 'Message', 'info', 4000)
```

**Parameters:**

* `title` (string or nil): the notification title
* `message` (string): the text
* `type` (string): `'info'`, `'success'`, `'warning'` or `'error'`
* `duration` (number, optional): milliseconds. Defaults to `Config.Notifications.defaultDuration`.

From the server, notify one player or everyone:

```lua theme={null}
-- playerId, or -1 for everyone
TriggerEvent('revo_hud:server:notify', playerId, 'Title', 'Message', 'info', 4000)
```

> [!WARNING]
>
> `revo_hud:server:notify` is server-only. Clients cannot trigger it, so a player cannot send notifications to others.

To send the framework's own notifications to the HUD, see [Configuration](/products/hud/configuration#notifications).

## Status Bars

Feed hunger, thirst or any other bar yourself (0 to 100), for a server without a framework source or to override one:

```lua theme={null}
exports['revo_hud']:setStatus('hunger', 62)
exports['revo_hud']:setStatuses({ hunger = 62, thirst = 40 })
```

A value you set this way beats the framework's own. Pass `nil` as the value (`exports['revo_hud']:setStatus('hunger', nil)`) to hand the bar back to the framework.

## Stress

```lua theme={null}
exports['revo_hud']:AddStress(5)
exports['revo_hud']:RelieveStress(10)
exports['revo_hud']:SetStress(0)
```

Stress is also raised and relieved by QBCore's `hud:server:GainStress` and `hud:server:RelieveStress` events, which most QBCore scripts already use.

## Seatbelt and Harness

```lua theme={null}
exports['revo_hud']:isSeatbeltOn()
exports['revo_hud']:ToggleSeatbelt()
exports['revo_hud']:SeatbeltState(true)       -- buckle or unbuckle
exports['revo_hud']:setHarnessTier(2)         -- 0 = none, 1-3 = Config.Harness.tiers
exports['revo_hud']:getHarnessTier()
```

## Nitrous (Client)

Read the car you are looking at, or feed the gauge from your own nitrous script (with `Config.Nitro.driveBoost = false`):

```lua theme={null}
exports['revo_hud']:hasNitro(vehicle)
exports['revo_hud']:getNitroLevel(vehicle)    -- 0-100, or nil without a kit
exports['revo_hud']:setNitro(75, false)       -- level, boosting
```

## Nitrous (Server)

For a mechanic shop, a garage or an admin menu. Each export takes a vehicle entity, a network id or a plate, and is saved by plate.

```lua theme={null}
exports['revo_hud']:installNitro(vehicle, 100)   -- fit a kit, bottle level 0-100
exports['revo_hud']:refillNitro(vehicle, 50)     -- add 50%; no amount fills it
exports['revo_hud']:removeNitro(vehicle)
exports['revo_hud']:hasNitro(vehicle)
exports['revo_hud']:getNitroLevel(vehicle)
```

> [!TIP]
>
> Use `Config.Nitro.fitting = 'export'` if you want only your own scripts to fit nitrous kits.

## Hiding the HUD

Hide the HUD for a moment, for example for a phone, an appearance menu or a cutscene. Each reason is undone separately, so two scripts can hide it at once without interfering:

```lua theme={null}
exports['revo_hud']:hide('myscript')
exports['revo_hud']:show('myscript')
exports['revo_hud']:isVisible()
exports['revo_hud']:isReady()
```

The same can be done with the `revo_hud:hide` and `revo_hud:show` client events.

## Custom Framework

Tell the HUD when your character is in the world:

```lua theme={null}
exports['revo_hud']:setCharacterLoaded(true)
```

## Train Scripts

A train job knows things the train does not: the line's speed limit, the next stop and its own top speed. All values are optional, and speeds are in km/h:

```lua theme={null}
exports['revo_hud']:setTrainInfo({ speedLimit = 80, nextStop = 'Davis', topSpeed = 160 })
exports['revo_hud']:clearTrainInfo()

-- or from another client script
TriggerEvent('revo_hud:setTrainInfo', { nextStop = 'Strawberry' })
```

Getting out of a train clears the info, so a job that forgets to clear does not leave a stale stop on the next train.

## Key Hints

Replace the key hints panel's list for this player, for example for a job or a minigame. Pass `nil` to put the config's list back:

```lua theme={null}
exports['revo_hud']:setKeybindHints({
    { label = 'Emotes', key = 'F3', command = 'emotes' },
})
exports['revo_hud']:setKeybindHints(nil)
```

Adding a `command` makes the hint follow the key the player bound to that command.

## Export Reference

| Export | Side | Description |
| - | - | - |
| `Notify` / `notify` | Client | Show a notification |
| `setStatus`, `setStatuses` | Client | Set status bar values |
| `AddStress`, `RelieveStress`, `SetStress` | Client | Change stress |
| `isSeatbeltOn`, `ToggleSeatbelt`, `SeatbeltState` | Client | Read or change the seatbelt |
| `setHarnessTier`, `getHarnessTier` | Client | Set or read the harness |
| `hasNitro`, `getNitroLevel`, `setNitro` | Client | Read nitrous or feed the gauge |
| `hide`, `show`, `isVisible`, `isReady` | Client | Control HUD visibility |
| `setCharacterLoaded` | Client | Tell the HUD the character is loaded |
| `setTrainInfo`, `clearTrainInfo` | Client | Send train line info |
| `setKeybindHints` | Client | Replace the key hints list |
| `installNitro`, `refillNitro`, `removeNitro`, `hasNitro`, `getNitroLevel` | Server | Manage nitrous on vehicles |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.