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.

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

enableMenu

Re-enables the Pause Menu after it was disabled.

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

setMenuState(state)

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

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

getMenuState

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

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.

Last updated