Commands#
Pause Menu Creator registers two chat commands, an optional keybind and one diagnostic. The names of the first two are set in shared/config.lua.
Command | Where | Description |
|---|---|---|
| In game | Opens the menu directly, without the ESC hook — the quickest way to tell whether a problem is the menu or only its trigger. The name is |
| In game | Opens the creator, and closes it if it is already open. Admins only — see Granting Creator Access. The name is |
Extra key | Keybind | Set |
| In game (output in F8) | Diagnostic for the route drawn on the map. Set a waypoint, run it, and the F8 console prints the road distance, which way of reading GTA's GPS answered, and how many points of the route were sampled. |
ESC itself needs no command: with Config.Menu.replacePauseMenu on, pressing it opens this menu instead of GTA's.
Client Exports#
For opening the menu from your own scripts — a radial menu, a phone app, a key of your own — and for naming the blips your scripts create.
Opening and closing the menu
exports['qs-pausemenu']:Open() -- also OpenMenu()
exports['qs-pausemenu']:Close() -- also CloseMenu()
local open = exports['qs-pausemenu']:IsOpen() -- booleanOpen() does nothing while the menu is already open, while GTA's own pause menu or the creator is up, or while another resource holds the cursor. A player who is down is told they cannot open it.
-- Your own key, on top of ESC
RegisterCommand('mymenu', function()
if not exports['qs-pausemenu']:IsOpen() then
exports['qs-pausemenu']:Open()
end
end)
RegisterKeyMapping('mymenu', 'Open the server menu', 'keyboard', 'F1')Opening GTA's settings
exports['qs-pausemenu']:OpenGameSettings()Closes this menu and opens the game's own pause menu on its settings page (Config.Actions.gtaSettingsComponent). The ESC hook stands down until the player leaves it. It is the same thing the Open GTA's settings button does.
Opening the creator
exports['qs-pausemenu']:OpenCreator()The same as /pausecreator, including the permission check — it is a shortcut, not a way to grant access.
Naming a blip on the map
exports['qs-pausemenu']:SetBlipName(blip, 'Central Garage')
exports['qs-pausemenu']:SetBlipName(blip, false) -- forget itGives the map legend the real name of a blip your script created. Colour codes are cleaned out, and names of blips that no longer exist are forgotten on their own. Integrations shows the one-line hook that does this for a whole resource.
Server Exports#
For choosing which theme the whole server sees from your own scripts — a holiday theme for an event, a different one on a weekend.
GetActiveTheme
local id = exports['qs-pausemenu']:GetActiveTheme() -- string or nilThe id of the live theme. nil means nothing was set live, and players get Config.Menu.defaultTheme.
GetThemes
for _, theme in ipairs(exports['qs-pausemenu']:GetThemes()) do
print(theme.id, theme.name)
endEvery theme saved from the creator, sorted by name. The eight bundled themes are not in this list — they live inside the interface — unless you saved your own version of one. A theme made in the creator gets a generated id (such as theme_1k2f9a), so look it up here by the name you gave it.
SetActiveTheme
local ok = exports['qs-pausemenu']:SetActiveTheme('cyberpunk') -- true on successSets a theme live for everyone, immediately — nobody reconnects. The id can be a bundled theme (launch, onyx, aurora, carbon, cyberpunk, ivory, hackerman, velvet) or the id of one you saved. It is stored, so it survives a restart. An id that matches no theme leaves players on the default one.
-- A theme you saved as "Halloween" for October, Onyx the rest of the year
local function themeIdByName(name)
for _, theme in ipairs(exports['qs-pausemenu']:GetThemes()) do
if theme.name == name then return theme.id end
end
end
CreateThread(function()
Wait(5000) -- saved themes are loaded a moment after qs-pausemenu starts
local halloween = themeIdByName('Halloween')
local month = tonumber(os.date('%m'))
exports['qs-pausemenu']:SetActiveTheme((month == 10 and halloween) or 'onyx')
end)Events#
Event | Side | Description |
|---|---|---|
| Client, local | Fired when a player presses Leave the server with |
| Client, local |
|
| Server → client | Shows a message through the resource's |
Theme buttons can also fire any event you name — Trigger a client event or Trigger a server event in the inspector. A button that opens your own feature needs nothing more than a handler:
-- A theme button with the action "Trigger a server event" and the value myserver:dailyReward
RegisterNetEvent('myserver:dailyReward', function()
local src = source
-- check and hand out the reward
end)About the Errors#
When the creator or a saved place is refused, the server answers with a short key rather than a sentence. The creator shows its own message for it; the key is what to look for in Common Errors, which lists what each one means.



