# Exports

These exports were created to manually control the Pause Menu behavior in specific cases. While the Pause Menu automatically detects active UIs and prevents interference when pressing ESC, some scripts don’t use FiveM’s native NUI system, making automatic detection impossible. These exports allow you to handle those cases manually.

***

**`disableMenu`**

Disables the Pause Menu. Use this when your custom UI is active.

```lua
exports['neon-pause']:disableMenu()
```

***

**`enableMenu`**

Re-enables the Pause Menu after it was disabled.

```lua
exports['neon-pause']:enableMenu()
```

***

**`setMenuState(state)`**

Manually sets the Pause Menu state (`true` to enable, `false` to disable).

```lua
exports['neon-pause']:setMenuState(false)
```

***

**`getMenuState`**

Returns the current state of the Pause Menu (`true` or `false`).

```lua
local menuState = exports['neon-pause']:getMenuState()
```

***

Use these exports in scripts with custom UIs that don’t rely on NUI to ensure seamless integration with the Pause Menu.


---

# 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-pause-menu/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.
