Skip to main content

Menu Items

Configuring menu items, sub-menus, job menus, and vehicle menus

This section

Menu Items

The radial menu supports static items, nested sub-menus, job-specific menus, and vehicle-specific menus — all defined in config.lua.

Item Fields

FieldTypeRequiredDefaultDescription
labelstringYesText displayed on the menu segment
iconstringYesIonicons icon name (e.g., "car-outline")
eventstringNonilClient event to trigger on click
serverEventstringNonilServer event to trigger on click
commandstringNonilChat command to execute (without /)
actionstringNonilCustom action string for predefined function mapping
itemstableNonilSub-menu items array (enables nesting)
shouldClosebooleanNotrueWhether clicking closes the menu
dataanyNonilAdditional data passed to the event
isServerbooleanNonilIf true, triggers server event instead of client

Example Configuration

lua
Config.MenuItems = {
{
label = "General",
icon = "albums-outline",
items = {
{ label = "ID Card", icon = "card-outline", event = "code9_radialMenu:showID" },
{ label = "Billing", icon = "cash-outline", event = "esx_billing:openBilling" },
},
},
{
label = "Emotes",
icon = "happy-outline",
command = "emotemenu",
},
}

Job-Specific Menus

Items that appear only when the player's current job matches. Defined in Config.JobMenus:

lua
Config.JobMenus = {
["police"] = {
{
label = "Police Actions",
icon = "shield-outline",
items = {
{ label = "Handcuff", icon = "lock-closed-outline", event = "police:cuff" },
{ label = "Search", icon = "search-outline", event = "police:search" },
},
},
},
}

Vehicle-Specific Menus

Items that appear only when the player is inside a vehicle. Defined in Config.VehicleMenus:

lua
Config.VehicleMenus = {
{
label = "Vehicle Control",
icon = "car-outline",
items = {
{ label = "Toggle Engine", icon = "power-outline", command = "engine" },
{ label = "Door Lock", icon = "lock-closed-outline", command = "doorlock" },
},
},
}

Sub-menus support unlimited depth. Add an items array to any item to make it open a sub-menu:

lua
{
label = "Vehicle",
icon = "car-outline",
items = {
{ label = "Engine", icon = "power-outline", command = "engine" },
{
label = "Doors",
icon = "exit-outline",
items = {
{ label = "Hood", icon = "arrow-up-outline", command = "hood" },
{ label = "Trunk", icon = "arrow-down-outline", command = "trunk" },
},
},
},
}

A "Back" button is automatically added when inside a sub-menu.