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

# Triggers and Exports

## **DISPLAY**

#### **1. Display**

Controls the visibility of the HUD.\
Passing `false` hides the HUD, while `true` shows it.

```lua
-- Hide the HUD
exports['neon-hud']:Display(false)

-- Show the HUD
exports['neon-hud']:Display(true)
```

***

#### **2. GetDisplayState**

Returns whether the HUD is currently visible or hidden.

```lua
-- Get current HUD visibility state (true = visible, false = hidden)
local isVisible = exports['neon-hud']:GetDisplayState()
print("HUD is visible:", isVisible)
```

***

#### **3. GetDisplayInfo**

Provides detailed information about the current HUD status.

```lua
-- Get detailed HUD status
local displayInfo = exports['neon-hud']:GetDisplayInfo()
print("HUD visible:", displayInfo.visible)
print("HUD hidden:", displayInfo.hidden)
print("Cinematic mode:", displayInfo.cinematic)
print("Pause menu active:", displayInfo.paused)
```

***

### 📢 Events

#### **neon-hud:displayStateChanged**

This event is triggered whenever the HUD display state changes.

```lua
rfer-- Listen for HUD visibility changes
RegisterNetEvent('neon-hud:displayStateChanged', function(isVisible)
    if isVisible then
        print("HUD has been shown")
    else
        print("HUD has been hidden")
    end
end)
```

## **STRESS**

* These functions are to be called from any script and will do things to stress of the players. **For example, if you want an ITEM to reduce stress...**

Reset stress completely:

```lua
neon-hud:resetStress
```

Reduce any amount of stress you want:

```lua
neon-hud:removeStress, value
```

Increase the amount of stress as much as you want.:

```lua
neon-hud:addStress, value
```

Example:

```lua
local stressReduction = 20
TriggerEvent('neon-hud:removeStress', stressReduction)
```
