# Exports (/docs/orbit-studios-resources/orbit-dynamichud/exports)



# Exports [#exports]

DynamicHUD exposes both client and server integration points. Use the client exports from client scripts when you want to update the local player's HUD UI, and use the server export when server code needs to show or hide a player's HUD.

<TypeTable
  type="{
  SeatbeltState: {
    type: 'client export',
    description: 'Updates the HUD seatbelt indicator. Signature: SeatbeltState(state). Does not return a value.',
  },
  CruiseControlState: {
    type: 'client export',
    description: 'Updates the HUD cruise-control indicator. Signature: CruiseControlState(state). Does not return a value.',
  },
  toggleHud: {
    type: 'client/server export',
    description: 'Client signature: toggleHud(bool). Server signature: toggleHud(source, bool). Shows or hides the HUD through the hud:showHud state bag.',
  },
  'hud:server:toggleHud': {
    type: 'server event',
    description: 'Toggles HUD visibility from server-side code.',
  },
}"
/>

```lua title="resources/[custom]/client/main.lua"
exports['orbit-dynamichud']:SeatbeltState(true)
exports['orbit-dynamichud']:CruiseControlState(false)

exports['orbit-dynamichud']:toggleHud(false)
```

The client `toggleHud(false)` export asks the server to set `Player(source).state["hud:showHud"] = false`. Use `toggleHud(true)` to show it again.

```lua title="resources/[custom]/server/main.lua"
exports['orbit-dynamichud']:toggleHud(source, true)
```

Notification examples now live in [Interface](/docs/orbit-studios-resources/orbit-dynamichud/interface).

For custom seatbelt or cruise resources, prefer setting `LocalPlayer.state.seatbelt` and `LocalPlayer.state.cruise` when possible. The Orbit addon does this automatically and also triggers the compatibility events DynamicHUD listens for.
