Configuration
The core settings are in shared/config.lua. The built-in interaction menus and shops are configured in shared/config/shops.lua, which loads right after it and only fills keys you haven't set, so you can override any of its values in shared/config.lua. Both files are shared (client and server), so keep secrets out of them.
Overview
| Option | Default | Description |
|---|---|---|
Config.Debug | false | Debug output: bridge selection, rejected NUI callbacks, server action failures |
Config.Framework | 'auto' | 'qbx', 'qb', 'esx', 'standalone', or auto-detect (qbx_core → qb-core → es_extended → standalone) |
Config.Locale | 'en' | Default UI language ('en', 'de'). Players can switch it in the settings menu |
Config.FocusMode | 'walk' | 'walk' or 'nui'. See Focus mode |
Config.Keys | see below | Default key mappings |
Config.Defaults | see below | Default player settings |
Config.Theme | { brand = nil, strength = 'accent', allowPlayerBrand = false } | Server brand colour. See Theming & settings |
Config.Builtin | all true | Switch built-in menus on or off. See Built-in menus |
Config.Quick | see below | Hooks the F1 quick menu into other resources |
Config.Admin | { ace = 'np_menu.admin' } | Ace that unlocks admin menus and admin server actions |
Config.Shops | see below | Shop locations, blips and prices (from shared/config/shops.lua) |
Config.Interact | see below | Built-in radial interactions (from shared/config/shops.lua) |
Config.Context | see below | Built-in context menu (from shared/config/shops.lua) |
Config.OxCompat | false | Expose ox_lib-like exports. See ox_lib compatibility |
Config.ImageHosts | { 'cfx-nui-', 'nui://', 'r2.fivemanage.com' } | Allowed prefixes / hosts for preview card images. Anything else is dropped, so a menu can't load an IP-grabbing URL |
Advanced tuning with safe defaults: Config.Input, Config.Controls, Config.ContextMenu, Config.RadialMenu, Config.Sounds and Config.RateLimit. See Advanced.
Focus mode
| Mode | Behaviour |
|---|---|
'walk' (default) | Menus open without NUI focus. The player can keep walking or driving. Lua reads the navigation controls (Config.Controls) and forwards them to the web as input messages. Focus is taken only while the player types (search, input rows, dialogs) or toggles the cursor (Config.Keys.cursor, Caps Lock) |
'nui' | List, grid and context menus take NUI focus with the cursor. The web handles keyboard and mouse itself |
Players can override this in the settings menu (focusMode). Dialogs and the radial wheel always take focus.
Keys
Config.Keys = {
quick = 'F1', -- F1 quick menu (grid)
radial = 'LMENU', -- radial wheel, open while held (Left Alt)
dev = 'F10', -- dev / admin menu
context = 'G', -- hold to target, release to open the context menu
cursor = 'CAPITAL', -- toggle the mouse cursor in walk mode (Caps Lock)
}These are RegisterKeyMapping defaults: players rebind them in Settings → Key Bindings → FiveM. Setting any key to false skips its mapping (the command and the API keep working). Config.Keys.shopCamera (default 'C') cycles the shop camera; the shop interact key is Config.Shops.interactKey (control 38, E).
Player setting defaults
Config.Defaults = {
position = 'right', -- 'right' | 'left' | 'center'
density = 'comfortable', -- 'comfortable' | 'compact'
material = 'frosted', -- 'frosted' | 'liquid' (Liquid Glass)
scale = 1.0, -- 0.75 .. 1.5
sounds = true, -- native frontend sounds
}Players override these in the settings menu. Their choices are stored in client KVP (np_menu:settings).
Built-in menus
Config.Builtin = { dev = true, quick = true, radial = true, context = true, shops = true, settings = true }Quick menu hooks
Config.Quick = {
inventoryEvent = nil, -- client event that opens your inventory, e.g. 'ox_inventory:openInventory'
inventoryCommand = 'inventory',-- command run when no event is set and ox_inventory isn't started
billsEvent = nil, -- client event that opens your bills UI
dutyEvent = nil, -- client event that toggles duty
dutyEventServer = nil, -- or a server event that toggles duty
}Interactions (radial)
Config.Interact = {
lockMode = 'auto', -- 'auto': qbx_vehiclekeys / qb-vehiclekeys key check when started; 'native': plain locking
vehicleRange = 4.0, -- metres to the closest vehicle on foot
playerRange = 3.0, -- metres for player interactions (the server checks again)
giveMoney = { enabled = true, account = 'cash', max = 1000000, rate = 2000 },
showId = { enabled = true, rate = 3000 },
giveKeys = { enabled = true, rate = 2000 },
carry = { enabled = false, timeout = 10000 }, -- carry / escort, the target must accept
ped = { enabled = false }, -- placeholder NPC options
quickMenus = { -- menus the on-foot radial items open (hidden if not registered)
emotes = { 'np_menu_quick_emotes' },
walk = { 'np_menu_quick_walk' },
clothing = { 'np_menu_quick_clothing' },
},
}rate values are milliseconds between two uses per player.
Context menu
Config.Context = {
distance = 5.0, -- raycast length from the camera
outline = { r = 255, g = 255, b = 255, a = 200 }, -- outline colour of the targeted entity
repair = { item = 'repairkit', duration = 6000 }, -- item consumed by "Repair", animation ms
impound = { jobs = { 'police' }, requireDuty = true },
pickupModels = { 'prop_cs_cardbox_01', 'prop_ld_suitcase_01', 'prop_cs_package_01' }, -- placeholder "Pick up"
}Shops
Config.Shops = {
interactKey = 38, -- INPUT_CONTEXT (E) inside a shop zone
marker = { type = 36, scale = 0.9, r = 255, g = 255, b = 255, a = 140, drawDistance = 25.0 },
tuning = {
account = 'bank',
blip = { sprite = 72, colour = 0, scale = 0.75 },
locations = {
{ label = "Benny's Original Motorworks", coords = vector3(-211.55, -1324.55, 30.89), radius = 6.0, bennys = true },
-- LS Customs Burton, LSIA, La Mesa, Route 68, Beeker's Garage Paleto
},
},
clothing = {
account = 'cash',
blip = { sprite = 73, colour = 0, scale = 0.7 },
maxOutfits = 10,
locations = { --[[ Binco, Suburban, Ponsonbys, Discount Store ... ]] },
},
prices = { ... },
palette = { { index = 111, hex = '#F0F0F0', label = 'Ice White' }, ... },
neonPalette = { '#FFFFFF', '#FF0000', ... },
}Set blip = false on a single location to hide its blip.
Prices
| Key | Default | Meaning |
|---|---|---|
prices.mods[11] … [16] | lists | Engine, brakes, transmission, suspension, armour: price per level (index 1 = level 0) |
prices.cosmetic | { base = 500, step = 150 } | Every other mod slot: base + step × level |
prices.wheels | 1200 | Any front / rear wheel |
prices.wheelType | 0 | Switching the wheel type itself |
prices.turbo / xenon / neon | 15000 / 2500 / 2000 | Turning it on (off is free) |
prices.xenonColor / primary / secondary / pearl / wheelColor / tint / plate / neonColor | 500 / 1500 / 1000 / 750 / 400 / 500 / 250 / 500 | Flat price per change |
prices.clothing | { default = 120, c11 = 250, … } | Flat price per changed slot: c<id> for components, p<id> for props |
Stock parts (-1) are free. The client shows the cart total, but the server recomputes the price from the submitted changes (NpMenu.shopTuningPrice / NpMenu.shopClothingPrice, shared so both sides agree).
Advanced
Input (walk mode)
Config.Input = {
repeatDelay = 320, -- ms before a held key starts repeating
repeatInterval = 110, -- first repeat interval (ms)
repeatMin = 35, -- fastest repeat interval (ms)
repeatAccel = 0.85, -- each repeat multiplies the interval by this
closeGrace = 400, -- ms to keep blocking ESC / pause after a menu closed
}Controls
Config.Controls lists the control indices that walk mode reads for each navigation key. Every entry is a list; any of them triggers the key.
| Key | Default controls |
|---|---|
up / down / left / right | 172 / 173 / 174 / 175 (arrow keys, d-pad) |
enter | 191, 201 (Enter, pad A) |
back | 177, 194, 202 (Backspace / ESC / right mouse, pad B) |
pageup / pagedown | 10 / 11 |
home / end | 212 / none |
pin | 246 (Y). Not F, because F would block entering vehicles while a menu is open |
search | 37 (Tab) |
shift | 21 (Left Shift): bigger steps |
disable | attack / aim, weapon wheel, phone, pause, vehicle radio… disabled every frame while a menu is open |
look | camera look plus attack, disabled while the radial wheel or the cursor is shown |
Context menu and radial
Config.ContextMenu = {
rate = 50, -- ms between anchor updates (at most 20 Hz)
maxDistance = 8.0, -- metres from the player before it closes
offset = 0.0, -- default z offset on the entity (per menu: def.offset)
}
Config.RadialMenu = {
maxPerRing = 8, -- more items move into a "More" ring (capped at 8: the wheel renders 8 slices)
rayDistance = 6.0, -- raycast distance for the player / ped / object contexts
nearVehicle = 3.5, -- 'vehicle' context also applies this close to a vehicle on foot
}Sounds
Config.Sounds maps the UI sounds (nav, select, back, error, toggle, open, close) to a PlaySoundFrontend name and sound set, e.g. nav = { 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET' }.
Rate limits
Config.RateLimit = {
defaultAction = 250, -- ms between two calls of the same action by one player (when no `rate` is given)
perSecond = 15, -- token bucket over ALL actions per player
burst = 30,
aceQueries = 64, -- distinct ace strings one player may query
maxPayload = 16384, -- approximate JSON bytes of one action payload
}