🛠️ Installations

📱 Syntax PauseMenu - Configuration Guide

� Quick Setup

Installation

  1. Download the resource to your resources folder

  2. Add to server.cfg: ensure Syntax_PauseMenu

  3. Restart your server

Requirements

  • ESX or QBCore Framework

  • Updated FiveM Server


⚙️ Basic Configuration

Framework & Language

Config.Framework = 'auto'  -- 'esx', 'qbcore', or 'auto'
Config.Locale = 'en'       -- 'en', 'es', 'fr'
Config.OpenKey = 'ESCAPE'  -- Menu open key

Logo Settings

Config.Logo = {
    enabled = true,
    useImage = true,               -- true = image, false = icon
    imagePath = 'assets/logo.png', -- Image path in nui/assets/
    text = 'SYNTAX '               -- Logo text
}

🎵 Audio System

Config.Sounds = {
    enabled = true,
    menuOpen = {
        file = 'menu_open.mp3',    -- Audio file in nui/assets/
        volume = 0.7               -- Volume (0.0 - 1.0)
    },
    buttonClick = {
        file = 'button_click.mp3',
        volume = 0.5
    }
}

Adding Custom Sounds:

  1. Place .mp3 files in nui/assets/

  2. Update config with filename

  3. Adjust volume as needed


� Player Information

Config.ShowPlayerInfo = {
    enabled = true,
    showName = true,      -- Show player name
    showId = true,        -- Show server ID
    showJob = true,       -- Show current job
    showCash = true,      -- Show cash money
    showBank = true,      -- Show bank money
    showPing = true       -- Show ping
}

🗺️ Map Configuration

Config.Map = {
    enabled = true,
    showCurrentLocation = true,  -- Show current location
    zoomLevel = 0.8,            -- Zoom level (0.1 - 2.0)
    mapOpacity = 0.9            -- Map opacity (0.0 - 1.0)
}

📢 Announcements

Config.Announcements = {
    enabled = true,
    autoRotate = true,        -- Auto rotate announcements
    rotationTime = 5000,      -- Time between rotations (ms)
    announcements = {
        {
            title = "Welcome!",
            text = "Join our Discord for updates and events.",
            icon = "fas fa-star",
            color = "#FFD700"
        }
        -- Add more announcements...
    }
}

Announcement Structure:

  • title - Main title

  • text - Description text

  • icon - FontAwesome icon

  • color - Text/icon color (hex)


Config.SideButtons = {
    {
        name = 'settings',
        label = 'settings',           -- Translation key
        icon = 'fas fa-cog',         -- FontAwesome icon
        enabled = true,
        action = 'openSettings'       -- Action to execute
    },
    {
        name = 'exit',
        label = 'exit',
        icon = 'fas fa-sign-out-alt',
        enabled = true,
        action = 'disconnect',
        confirmDialog = true          -- Show confirmation dialog
    }
}

Available Actions:

  • openSettings - Open settings menu

  • resume - Close menu and continue

  • disconnect - Disconnect from server


🔗 Discord Integration

Config.Discord = {
    enabled = true,
    webhookURL = 'https://discord.com/api/webhooks/...',
    botName = 'Pause Menu Logger',
    logActions = {
        buttonClick = true,    -- Log button clicks
        disconnect = true      -- Log disconnections
    }
}

Setup Webhook:

  1. Go to Discord channel settings

  2. Create webhook and copy URL

  3. Paste URL in webhookURL


⚡ Performance

Config.Performance = {
    updateInterval = 1000    -- Update interval in milliseconds
}

Recommendations:

  • High player count: 2000ms (2 seconds)

  • Small servers: 500ms (0.5 seconds)

Built-in Optimizations

  • ✅ Event delegation for better memory usage

  • ✅ Request cancellation to avoid pending requests

  • ✅ Selective updates (only changed data)

  • ✅ Audio object reuse

  • ✅ Hover sound frequency control


🎯 Events & Callbacks

Client Events

-- Open menu programmatically
TriggerEvent('syntax_pausemenu:client:openMenu')

-- Close menu programmatically
TriggerEvent('syntax_pausemenu:client:closeMenu')

Server Events

-- Detect menu open
RegisterServerEvent('syntax_pausemenu:server:menuOpened')
AddEventHandler('syntax_pausemenu:server:menuOpened', function()
    local src = source
    print('Player ' .. src .. ' opened pause menu')
end)

🛠️ Troubleshooting

Menu not opening:

  • ✅ Check resource is in server.cfg

  • ✅ Verify framework configuration

  • ✅ Check console for errors

No sound:

  • ✅ Ensure Config.Sounds.enabled = true

  • ✅ Check MP3 files are in nui/assets/

  • ✅ Verify filenames in config

Player info missing:

  • ✅ Confirm framework compatibility

  • ✅ Check ShowPlayerInfo configuration

  • ✅ Verify script permissions


📞 Support


Enjoy your optimized pause menu! 🚀

Last updated