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.
local open = exports['origen_pausemenu']:inMenu()Example — prevent another resource from triggering while the menu is open:
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.
exports['origen_pausemenu']:Close()Example — close the menu when entering a zone:
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).
exports['origen_pausemenu']:SetCanOpen(value)| Parameter | Type | Description |
|---|---|---|
value | boolean | true to allow, false to block |
Example — disable the menu during a scripted sequence:
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.