Installation

Installation

Use FiveManage (opens in a new tab) to host and manage your images efficiently.

Set ensure order

You must have the next order on your server.cfg for the scripts to start:

server.cfg
ensure cq-lib
ensure cq-bills
ensure cq-pausemenu

Set Background

To set the menu background, modify the Config.background property in your config.lua:

config.lua
Config.background = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-bg.png'

Set Sounds

Configure sound effects (hover, click, and transitions) via the Config.sounds table:

config.lua
Config.sounds = {
    volume = 0.1, -- Audio volume (0.0 to 1.0)
    hover = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/pause-hover.ogg',
    click = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/click.mp3',
    transition = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/transition.mp3'
}
  • volume: Volume level for all sound effects.
  • hover: URL of hover sound effect.
  • click: URL of click sound effect.
  • transition: URL of transition sound effect.

Configure Menu Options

Modify core menu options in the Config.menu_options table:

config.lua
Config.menu_options = {
    map = {
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-map.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/map.svg'
    },
    properties = {
        enable = true,
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-properties.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/home.svg'
    },
    commerces = {
        enable = true,
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-properties.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/shops.svg'
    },
    settings = {
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-settings.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/settings.svg'
    },
    help = {
        enable = true,
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-help.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/help.svg'
    },
    exit = {
        event = 'disconnect', -- 'disconnect' or 'logout'
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-exit.png',
        icon = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/door-exit.svg'
    },
    bills = true
}
  • map.image: Set image background for the "Map" card.
  • map.icon: Set icon for the "Map" label.
  • properties.enable: Toggle visibility for "Properties" menu.
  • properties.image: Set image background for the "Properties" card.
  • properties.icon: Set icon for the "Properties" label.
  • commerces.enable: Toggle visibility for "Commerces" menu.
  • commerces.image: Set image background for the "Commerces" card.
  • commerces.icon: Set icon for the "Commerces" label.
  • settings.image: Set image background for the "Settings" card.
  • settings.icon: Set icon for the "Settings" label.
  • help.enable: Toggle visibility for "Help" menu.
  • help.image: Set image background for the "Help" card.
  • help.icon: Set icon for the "Help" label.
  • exit.event: Event for the "Exit" menu.
  • exit.image: Set image background for the "Exit" card.
  • exit.icon: Set icon for the "Exit" label.
  • bills.enable: Toggle visibility for the "Bills" menu.
  • To disable an icon, set it to false (e.g., map.icon = false).
  • Use the help option to link the menu to a server-side report system.
  • Set exit.event to logout if using a multi-character system; otherwise, use disconnect for simple exit functionality.

Configure Custom Events

Add behavior for help or exit events in cq-lib/bridge/client/actions/main.lua:

main.lua
exports('HelpMenu', function()
    ExecuteCommand('report') -- Replace with custom Help menu event logic
end)
 
exports('LogoutEvent', function()
    if GetResourceState('origen_titlemenu'):match('start') then
        TriggerEvent('origen_titlemenu:client:Logout')
        TriggerServerEvent('cq.lib:server:PlayerLogout')
    end
end)
  • HelpMenu: Triggers when the "Help" option is clicked.
  • LogoutEvent: Triggers when exit.event = 'logout' is selected.

Customize Shortcuts

Configure shortcuts related to menu navigation and events:

config.lua
Config.shortcuts = {
    [1] = {
        name = 'service',
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-services.png'
    },
    [2] = {
        name = 'organization',
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-organizations.png'
    },
    [3] = {
        name = 'business',
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-business.png'
    },
    [4] = {
        name = 'crew',
        image = 'https://r2.fivemanage.com/u5HR6uOgjbQM4owiGySU1/images/cq-pausemenu-crews.png'
    }
}
  • name: Shortcut's event name (matches exported event).
  • image: URL for the shortcut's image.

For advanced customizations, you can define additional behaviors or shortcuts in cq-lib/bridge/client/actions/main.lua.

Feel free to customize further based on your server's needs! 🚀