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

# Exports & Events

Control Striga Tokyo HUD from your own scripts.

{% hint style="success" %}
**Quick start**

Hide the HUD in a cutscene: `exports['striga-tokyo-hud']:SetHudHidden(true)`\
Add stress (client script): `TriggerServerEvent('hud:server:GainStress', 5)`
{% endhint %}

## Client exports

| Export                     | What it does                                            |
| -------------------------- | ------------------------------------------------------- |
| `SetHudHidden(hidden)`     | `true` hides the HUD, `false` shows it again            |
| `SetCinematic(on)`         | Cinematic mode on / off                                 |
| `SetMoney(cash, bank)`     | Money for a custom money system or standalone           |
| `SetNeeds(hunger, thirst)` | Needs 0 to 100, for a custom needs system or standalone |
| `GetTheme()`               | The HUD theme color, e.g. `'#f43f5e'`                   |

```lua
exports['striga-tokyo-hud']:SetHudHidden(true)
exports['striga-tokyo-hud']:SetCinematic(true)
exports['striga-tokyo-hud']:SetMoney(1500, 25000)
exports['striga-tokyo-hud']:SetNeeds(80, 65)
```

{% hint style="info" %}
On standalone, hunger, thirst and money stay hidden until a script calls `SetNeeds` / `SetMoney`.
{% endhint %}

***

## Stress and needs events (qb-hud names)

These are the same names qb-hud uses, so most scripts already work.

| Event                      | Side                   | What it does                             |
| -------------------------- | ---------------------- | ---------------------------------------- |
| `hud:server:GainStress`    | server (from a client) | Adds stress                              |
| `hud:server:RelieveStress` | server (from a client) | Removes stress                           |
| `hud:client:UpdateNeeds`   | client                 | Sets hunger and thirst                   |
| `hud:client:UpdateStress`  | client                 | The HUD fires this itself after a change |

```lua
-- client script
TriggerServerEvent('hud:server:GainStress', 5)
TriggerServerEvent('hud:server:RelieveStress', 10)

-- client
TriggerEvent('hud:client:UpdateNeeds', hunger, thirst)
```

{% hint style="warning" %}
GainStress / RelieveStress are checked on the server: the amount is capped at `Config.Stress.MaxChangePerEvent`, whitelisted jobs skip gains, and there is a limit of **10 calls per 5 seconds** per player.
{% endhint %}

***

## Vehicle events (client)

| Event                            | Arguments         | What it does                                |
| -------------------------------- | ----------------- | ------------------------------------------- |
| `seatbelt:client:ToggleSeatbelt` | `state`           | Seatbelt state (`nil` = toggle)             |
| `seatbelt:client:ToggleCruise`   | `on`              | Cruise control icon                         |
| `hud:client:UpdateNitrous`       | `level, hasNitro` | Nitro 0 to 100, `hasNitro = false` hides it |

```lua
TriggerEvent('seatbelt:client:ToggleSeatbelt', true)
TriggerEvent('seatbelt:client:ToggleCruise', true)
TriggerEvent('hud:client:UpdateNitrous', 60, true)
```

qb-smallresources, qbx\_seatbelt and qb-mechanicjob already fire these. You only need them for custom scripts.

***

## Theme color

The HUD sends the player's theme color through striga-core. To follow it in your own script, use striga-core:

```lua
-- current theme
local theme = exports['striga-core']:GetTheme() -- { accent = '#rrggbb' } or nil

-- live changes
AddEventHandler('striga-core:client:theme', function(theme)
    if theme and theme.accent then
        print('HUD theme is now', theme.accent)
    end
end)
```

{% hint style="info" %}
The older client event `striga-tokyo-hud:client:themeChanged` (argument: the color) and the `GetTheme` export still work, for scripts that read them.
{% endhint %}

***

## Show your script's settings in /hud

The `/hud` menu lists every script that registers its player settings with striga-core. Register yours with `exports['striga-core']:RegisterSettings(schema, handlers)` and it gets its own block in the menu, in share codes and in `/hud reset`.

See [Settings Hub & Theme](/docs/striga-core/settings-hub-and-theme.md) for the schema.

{% content-ref url="/pages/Mk4y2rSHQ3ElM93DRB01" %}
[Troubleshooting & FAQ](/docs/striga-tokyo-hud/troubleshooting-and-faq.md)
{% endcontent-ref %}


---

# 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://striga.gitbook.io/docs/striga-tokyo-hud/exports-and-events.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.
