# 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)
```


---

# Agent Instructions: 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:

```
GET https://codeforge.gitbook.io/codeforge/neon-series/neon-hud/triggers-and-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
