Enable the weapon wheel on ESX Legacy

Hi! I’m writing this first post to ask for help. I would like to understand the weapon wheel system of the Legacy version of ESX. When I stop my inventory (ox_inventory) and activate the Events ‘esx:addWeapon’ it still doesn’t work. I’ve coded a simple test script and nothing happens.

-- Client
RegisterCommand('testwpwheel', function()
    TriggerServerEvent('test:giveweapon')
end)

-- Server
RegisterServerEvent('test:giveweapon')
AddEventHandler('test:giveweapon', function()
  local xPlayer = ESX.GetPlayerFromId(source)
  xPlayer.addWeapon('WEAPON_PISTOL', 30)
end)

Thanks in advance to anyone who can help. If weapons can be displayed in the weapon wheel only if the player has the associated item, that would be great.

You may have Config.DisableWeaponWheel set to true in the es_extended config.

You say: “If weapons can be displayed in the weapon wheel only if the player has the associated item, that would be great.”
Is this related to the ox_inventory, because it can do this automatically. Or is this related to another inventory?

My Config.DisableWeaponWheel is set to false, same in the hud removal options (see photo).

If ox_inventory allows an item-weapon link between it and the weapon wheel then I wasn’t aware of it, yet I use this inventory. Can you please help me set up this link?

It‘s standard. Take a look at data/weapons.lua.
You just need xPlayer.addInventoryItem(„weapon_XXX“, 1)

Ox inventory used it‘s own weapon „wheel“.

I don’t want to use the ox_inv weapon wheel because it works with keybinds and I don’t like that.

I want this wheel :

Does anyone know how to do it ?

Enables the weapon wheel, but disables the use of inventory items.

Mostly used for weaponised vehicles, though could be called for “minigames”

local exports.ox_inventory:weaponWheel(state)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.