Configuration
Every option of config.lua explained.
Everything is in config.lua. Missing options fall back to their default value, so an old config keeps working after an update.
Detection#
Config.Framework = 'auto' -- 'esx' / 'qbcore' / 'qbox' / 'standalone'
Config.Inventory = 'auto' -- 'ox_inventory' / 'qb-inventory' / 'qs-inventory' / 'framework' / 'custom'
Config.Notification = 'ox_lib' -- 'framework' / 'native' / 'custom'qb-inventory also covers ps-inventory and lj-inventory. framework is the default ESX inventory (items and loadout). See Inventories to plug another inventory.
Keys and command#
Config.Keys = {
wheel = 'TAB', -- open the wheel
editor = false, -- open the editor (e.g. 'F6')
}
Config.Commands = {
editor = 'itemswheel', -- false to disable
}Wheel#
Config.Wheel = {
slots = 8,
pages = 3,
mode = 'hold',
unarmed = true,
autoRemove = true,
cooldown = 500,
disableNativeWheel = true,
blur = false,
allowMovement = true,
allowInVehicle = true,
allowWhileDead = false,
}| Option | Description |
|---|---|
slots | Slots per page, from 4 to 12. |
pages | Pages a player can create per wheel, from 1 to 5. |
mode | 'hold': hold the key and release it to use the slot. 'toggle': press to open, press again or click to use. |
unarmed | Fixed Unarmed slot at the bottom of the weapons wheel. |
autoRemove | Removes an item from the wheel when the player does not have it anymore (used, sold, dropped...). |
cooldown | Delay between two uses, in ms. |
disableNativeWheel | Disables the GTA weapon wheel. |
blur | Blurs the game behind the wheel. |
allowMovement | The player can keep walking while the wheel is open. |
allowInVehicle | The wheel can be opened in a vehicle. |
allowWhileDead | The wheel can be opened while dead. |
Changing slots keeps the wheels of your players: extra slots are added empty, removed slots are dropped.
Images#
Config.Images = {
path = 'auto',
extension = 'png',
}'auto' uses the image folder of your inventory. Set a folder or an url to use your own images, the file is <item name>.<extension> unless the inventory gives a file name:
Config.Images.path = 'nui://ox_inventory/web/images/'
Config.Images.path = 'https://cdn.example.com/items/'Blacklist#
Items that can never be placed on the wheel:
Config.Blacklist = { 'money', 'black_money', 'cash' }Default look#
Config.Customization = {
enabled = true,
defaults = {
accent = '#F7C531',
accentText = '#111111',
background = '#0B0B10',
text = '#FFFFFF',
opacity = 0.62,
size = 1.0,
radius = 12,
gap = 6,
inner = 0.46,
amounts = true,
animations = true,
},
}defaults is the look of a player who never changed it. With enabled = false every player uses defaults and the Customize tab is locked.
text colors the texts and icons drawn on the wheel, accentText the ones drawn on the accent color (selected slot, active tab, Done button). Keep accentText readable on your accent: dark on a light accent like the default yellow, white on a dark accent. Players can pick any color with the color picker of the editor.
| Value | Range |
|---|---|
accent, accentText, background, text | #RRGGBB |
opacity | 0.2 - 1.0 |
size | 0.7 - 1.4 |
radius | 0 - 28 (px) |
gap | 0 - 16 (px) |
inner | 0.35 - 0.6 |
Sounds#
Config.Sounds = {
open = { name = 'NAV_UP_DOWN', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
hover = { name = 'NAV_LEFT_RIGHT', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
select = { name = 'SELECT', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' },
}Set one to false to disable it.
Saved data#
Nothing is stored on the server. Everything lives in the client KVP of the resource:
| Key | Content |
|---|---|
layout:<identifier> | The wheel of a character (ESX identifier / citizenid) |
settings | The look of the wheel, shared by every character of the player |
Hooks#
client/custom.lua is not escrowed:
-- Return false to block the wheel / the editor
function Custom.CanOpen(mode)
if LocalPlayer.state.invBusy or LocalPlayer.state.invOpen then return false end
if IsPedCuffed(cache.ped) then return false end
return true
end
-- Return false to cancel the use of a slot
function Custom.CanUse(item, category)
return true
end
-- Called after a slot was used
function Custom.OnUse(item, category)
end