OrigenNetwork
Docs

Exports · origen_pausemenu

All exports are registered under the resource name origen_pausemenu.


Client-side exports

inMenu()boolean

Returns whether the pause menu is currently open for the local player.

lua
local open = exports['origen_pausemenu']:inMenu()

Example — prevent another resource from triggering while the menu is open:

lua
if exports['origen_pausemenu']:inMenu() then return end
-- ... your logic here ...

Close()

Programmatically closes the pause menu. Clears the NUI focus, fades out the screen blur, and removes the animation prop if enabled.

lua
exports['origen_pausemenu']:Close()

Example — close the menu when entering a zone:

lua
AddEventHandler('myScript:onEnterZone', function()
    exports['origen_pausemenu']:Close()
end)

SetCanOpen(value)

Sets whether the player is allowed to open the pause menu. Defaults to true. Set to false to block the menu from opening (e.g. during cutscenes or controlled sequences).

lua
exports['origen_pausemenu']:SetCanOpen(value)
ParameterTypeDescription
valuebooleantrue to allow, false to block

Example — disable the menu during a scripted sequence:

lua
exports['origen_pausemenu']:SetCanOpen(false)
-- ... scripted sequence ...
exports['origen_pausemenu']:SetCanOpen(true)

SetCanOpen is defined in custom/client.lua and is part of the open-source layer. You can extend its logic directly in that file if needed.