mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(client/menu): don't call HudWeaponWheelIgnoreSelection for RedM
* Update menu.lua * Update menu.lua
This commit is contained in:
@@ -46,28 +46,27 @@ end
|
||||
---@param startIndex? number
|
||||
function lib.showMenu(id, startIndex)
|
||||
local menu = registeredMenus[id]
|
||||
|
||||
if not menu then
|
||||
error(('No menu with id %s was found'):format(id))
|
||||
end
|
||||
|
||||
if not openMenu then
|
||||
local control = cache.game == 'fivem' and 140 or 0xE30CD707
|
||||
|
||||
CreateThread(function()
|
||||
while openMenu do
|
||||
if openMenu.disableInput == nil or openMenu.disableInput then
|
||||
DisablePlayerFiring(cache.playerId, true)
|
||||
HudWeaponWheelIgnoreSelection()
|
||||
if cache.game == 'fivem' then
|
||||
HudWeaponWheelIgnoreSelection() -- Not a REDM native
|
||||
end
|
||||
DisableControlAction(0, control, true)
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
openMenu = menu
|
||||
|
||||
lib.setNuiFocus(not menu.disableInput, true)
|
||||
|
||||
SendNUIMessage({
|
||||
@@ -81,7 +80,6 @@ function lib.showMenu(id, startIndex)
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
---@param onExit boolean?
|
||||
function lib.hideMenu(onExit)
|
||||
local menu = openMenu
|
||||
|
||||
Reference in New Issue
Block a user