FiveM Menu V1
Configuration

Configuration

FiveM Menu V1 offers extensive configuration options through multiple JSON and Lua files located in the config folder. This page covers all configuration aspects.

Configuration Files Overview

All configuration files are located in the config folder:

fivem-menu/
├── config/
│   ├── framework.lua      # Framework integration settings
│   ├── menu.json          # Menu layout and appearance
│   ├── controls.json      # Keybind configuration
│   ├── menu-items.json    # Menu structure and items
│   ├── actions.json       # Action mapping
│   └── debug.json         # Debug mode settings

Framework Configuration

File: config/framework.lua

Configure framework integration and event settings.

Config = {}
 
-- Framework Selection
-- Options: 'ESX', 'QBCore', or 'Standalone'
Config.Framework = 'ESX'
 
-- ESX Configuration
Config.ESX = {
    -- Event to get shared ESX object
    SharedObject = 'esx:getSharedObject',
    
    -- Event triggered when player data loads
    PlayerDataEvent = 'esx:playerLoaded',
    
    -- Event triggered on job change
    SetJobEvent = 'esx:setJob',
    
    -- Additional ESX settings
    UseNewESX = true,  -- Set to true for ESX Legacy
}
 
-- QBCore Configuration
Config.QBCore = {
    -- QBCore shared object name
    SharedObject = 'qb-core',
    
    -- Event triggered when player loads
    PlayerDataEvent = 'QBCore:Client:OnPlayerLoaded',
    
    -- Event triggered on job update
    SetJobEvent = 'QBCore:Client:OnJobUpdate',
    
    -- Additional QBCore settings
    UseNewQBCore = true,
}
 
-- Standalone Configuration
Config.Standalone = {
    -- Custom player load event (if any)
    PlayerLoadEvent = 'playerSpawned',
}

Framework Selection Guide

ESX:

  • For servers using ESX Framework
  • Set Config.Framework = 'ESX'
  • Ensure ESX is loaded before this resource

QBCore:

  • For servers using QBCore Framework
  • Set Config.Framework = 'QBCore'
  • Ensure QBCore is loaded before this resource

Standalone:

  • For servers without a framework
  • Set Config.Framework = 'Standalone'
  • Limited functionality without framework integration

Menu Configuration

File: config/menu.json

Configure menu appearance, position, and theme.

{
  "title": "Main Menu",
  "subtitle": "Press ESC to close",
  "position": "top-left",
  "theme": "dark",
  "animation": {
    "enabled": true,
    "duration": 300,
    "easing": "ease-in-out"
  },
  "styling": {
    "width": 400,
    "maxHeight": 600,
    "opacity": 0.95,
    "blur": true,
    "shadow": true,
    "borderRadius": 8
  },
  "behavior": {
    "closeOnSelect": false,
    "closeOnClickOutside": true,
    "playSound": true
  }
}

Position Options

  • top-left - Top left corner
  • top-right - Top right corner
  • center - Center of screen
  • bottom-left - Bottom left corner
  • bottom-right - Bottom right corner

Theme Options

  • dark - Dark theme (default)
  • light - Light theme
  • custom - Custom theme (requires CSS)

Controls Configuration

File: config/controls.json

Configure keybinds for menu navigation.

{
  "openMenu": "F5",
  "navigateUp": "UP",
  "navigateDown": "DOWN",
  "navigateLeft": "LEFT",
  "navigateRight": "RIGHT",
  "select": "ENTER",
  "back": "BACKSPACE",
  "closeMenu": "ESC",
  "alternative": {
    "openMenu": "F1",
    "navigateUp": "W",
    "navigateDown": "S",
    "navigateLeft": "A",
    "navigateRight": "D"
  }
}

Supported Key Codes

Common keys you can use:

  • Function Keys: F1 through F12
  • Letters: A through Z
  • Numbers: 0 through 9
  • Arrow Keys: UP, DOWN, LEFT, RIGHT
  • Special Keys: ENTER, BACKSPACE, ESC, TAB, SPACE
  • Modifiers: SHIFT, CTRL, ALT

Menu Items Configuration

File: config/menu-items.json

Define menu structure, categories, and items.

[
  {
    "label": "Player Options",
    "icon": "user",
    "description": "Manage player settings",
    "submenu": [
      {
        "label": "Heal Player",
        "icon": "heart",
        "description": "Restore health to maximum",
        "action": "healPlayer",
        "requiredJob": null,
        "requiredPermission": "player.heal"
      },
      {
        "label": "Give Armor",
        "icon": "shield",
        "description": "Equip full armor",
        "action": "giveArmor",
        "requiredJob": null,
        "requiredPermission": "player.armor"
      },
      {
        "label": "Suicide",
        "icon": "skull",
        "description": "Respawn at hospital",
        "action": "suicide",
        "confirmDialog": true
      }
    ]
  },
  {
    "label": "Vehicle Options",
    "icon": "car",
    "description": "Vehicle management",
    "requiredJob": "mechanic",
    "submenu": [
      {
        "label": "Repair Vehicle",
        "icon": "wrench",
        "description": "Fully repair current vehicle",
        "action": "repairVehicle",
        "requiresVehicle": true
      },
      {
        "label": "Flip Vehicle",
        "icon": "refresh",
        "description": "Flip vehicle upright",
        "action": "flipVehicle",
        "requiresVehicle": true
      }
    ]
  },
  {
    "label": "Admin Tools",
    "icon": "settings",
    "description": "Administrative functions",
    "requiredPermission": "admin",
    "submenu": [
      {
        "label": "Teleport to Waypoint",
        "icon": "map-pin",
        "action": "teleportToWaypoint"
      },
      {
        "label": "NoClip",
        "icon": "eye",
        "action": "toggleNoclip",
        "toggle": true
      },
      {
        "label": "God Mode",
        "icon": "shield",
        "action": "toggleGodMode",
        "toggle": true
      }
    ]
  }
]

Menu Item Properties

Required Properties:

  • label - Display name of the menu item
  • action or submenu - Either an action to execute or a submenu array

Optional Properties:

  • icon - Icon name (from icon library)
  • description - Brief description shown on hover
  • requiredJob - Job name required to see this item
  • requiredPermission - Permission required to access
  • requiresVehicle - Only show when player is in vehicle
  • confirmDialog - Show confirmation dialog before action
  • toggle - Item acts as on/off toggle
  • disabled - Disable the item (greyed out)

Actions Configuration

File: config/actions.json

Map action names to Lua functions.

{
  "actions": {
    "healPlayer": "HealPlayerAction",
    "giveArmor": "GiveArmorAction",
    "suicide": "SuicideAction",
    "repairVehicle": "RepairVehicleAction",
    "flipVehicle": "FlipVehicleAction",
    "teleportToWaypoint": "TeleportToWaypointAction",
    "toggleNoclip": "ToggleNoclipAction",
    "toggleGodMode": "ToggleGodModeAction"
  },
  "customActions": {
    "myCustomAction": {
      "type": "client",
      "script": "path/to/script.lua",
      "function": "MyCustomFunction"
    }
  }
}

Action Types

Built-in Actions: Predefined actions that come with the menu system.

Custom Actions:

  • type - Either client or server
  • script - Path to Lua file containing the function
  • function - Function name to call

Creating Custom Actions

Client-side action example:

-- client/custom_actions.lua
function MyCustomFunction()
    local playerPed = PlayerPedId()
    local coords = GetEntityCoords(playerPed)
    
    -- Your custom logic here
    TriggerEvent('chat:addMessage', {
        args = {'Menu', 'Custom action executed!'}
    })
end

Server-side action example:

-- server/custom_actions.lua
RegisterNetEvent('menu:customAction', function()
    local source = source
    
    -- Your custom server logic here
    TriggerClientEvent('chat:addMessage', source, {
        args = {'Menu', 'Server action executed!'}
    })
end)

Debug Configuration

File: config/debug.json

Enable debug mode for troubleshooting.

{
  "debug": false,
  "verboseLogging": false,
  "showCoordinates": false,
  "showFrameTime": false,
  "logLevel": "info",
  "features": {
    "logMenuOpen": true,
    "logMenuClose": true,
    "logActionExecution": true,
    "logPermissionChecks": true,
    "logFrameworkEvents": false
  }
}

Debug Options

  • debug - Enable general debug mode
  • verboseLogging - Enable detailed console output
  • showCoordinates - Display player coordinates on screen
  • showFrameTime - Show frame time and FPS
  • logLevel - Logging level: debug, info, warn, error

Debug Features

Toggle specific debug features:

  • logMenuOpen - Log when menu opens
  • logMenuClose - Log when menu closes
  • logActionExecution - Log action executions
  • logPermissionChecks - Log permission checks
  • logFrameworkEvents - Log framework event triggers

Advanced Configuration

Performance Tuning

For optimal performance, adjust these settings in menu.json:

{
  "performance": {
    "updateInterval": 100,
    "lazyLoadSubmenu": true,
    "cacheIcons": true,
    "maxVisibleItems": 10
  }
}

Security Settings

Configure security options in framework.lua:

Config.Security = {
    -- Enable permission checks
    EnablePermissions = true,
    
    -- Admin permission name
    AdminPermission = 'admin',
    
    -- Log unauthorized access attempts
    LogUnauthorizedAccess = true,
    
    -- Block menu in certain zones
    BlockedZones = {
        {x = 0.0, y = 0.0, z = 0.0, radius = 50.0}
    }
}

Localization

Support multiple languages in config/locales/:

-- config/locales/en.lua
Locales['en'] = {
    ['menu_title'] = 'Main Menu',
    ['player_options'] = 'Player Options',
    ['heal_player'] = 'Heal Player',
    -- Add more translations
}

Configuration Best Practices

  1. Backup Configuration: Always backup config files before making changes
  2. Test Changes: Test configuration changes on a development server first
  3. Performance: Disable unused features to improve performance
  4. Security: Only give necessary permissions to menu actions
  5. Documentation: Comment complex custom actions for future reference

Next Steps