Radial Menu
Configuration
Configuration for Radial Menu.
Configuration (config.lua)
| Option | Default | Description |
|---|---|---|
Config.Command / Config.Keybind | 'radialmenu' / 'F1' | Open / close command and default key |
Config.ResetCommand | 'fixmenu' | Releases the mouse if the menu ever gets stuck |
Config.ItemsPerPage | 8 on foot, 5 in vehicles | Buttons per page |
Config.VehicleUI.Enabled | true | Use the arc layout in vehicles |
Config.Menu | examples | The buttons – see below |
Buttons
lua
{
title = 'Police',
icon = 'fa-solid fa-building-shield', -- https://fontawesome.com/icons
job = 'police', -- false | 'police' | { 'police', 'sheriff' } | { police = 2 }
Status = 'onfoot', -- 'normal' | 'onfoot' | 'vehicle' | 'deathonly' | 'always'
items = { -- sub-menu
{ title = 'Cuff', icon = 'fa-solid fa-handcuffs', type = 'client', event = 'police:client:CuffPlayerSoft', shouldClose = true },
{ title = 'MDT', icon = 'fa-solid fa-tablet', type = 'command', event = 'mdt', shouldClose = true },
{ title = 'Tablet', icon = 'fa-solid fa-tablet', type = 'export', resource = 'lb-tablet', event = 'ToggleOpen', args = { true }, shouldClose = true },
},
}type | Runs |
|---|---|
'client' | TriggerEvent(event, args) |
'server' | TriggerServerEvent(event, args) |
'command' | ExecuteCommand(event) |
'action' | Actions[event](args) from actions.lua |
'export' | exports[resource][event](table.unpack(args)) |
The police / EMS buttons in the default config are examples for qb-policejob and qb-ambulancejob – replace the events with the ones of your own scripts.
Your own actions
actions.lua is an open file. Add a function and point a button at it:
lua
Actions['my:panic'] = function(args)
-- your dispatch export here
endlua
{ title = 'Panic', icon = 'fa-solid fa-circle-exclamation', type = 'action', event = 'my:panic', shouldClose = true }Last updated