Skip to content

Commit

Permalink
chore: ox_lib update to version 3.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Nov 20, 2023
1 parent 422d201 commit 1047c12
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
[voice-ui/pnpm-lock.yaml]: chore(deps-dev): bump follow-redirects in /voice-ui
[voice-ui/pnpm-lock.yaml]: chore(deps-dev): bump browserify-sign from 4.2.1 to 4.2.2 in /voice-ui
7. [npwd + es_extended]: chore: removed support for npwd_crypto @bitpredator
8. [ox_lib]: chore: ox_lib update to version '3.11.0' @bitpredator
8. [ox_lib]: chore: ox_lib update to version 3.12.0 @bitpredator
9. [esx_addons]: chore: replace esx_drivingschooljob with esx_dmvschool @bitpredator
10. [SQL]: chore: update database @bitpredator
11. [maps]: delete: remove maps verpi_driving_school @bitpredator
Expand Down
2 changes: 1 addition & 1 deletion server-data/resources/[ox]/ox_lib/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rdr3_warning 'I acknowledge that this is a prerelease build of RedM, and I am aw
--[[ Resource Information ]]--
name 'ox_lib'
author 'Overextended'
version '3.11.0'
version '3.12.0'
license 'LGPL-3.0-or-later'
repository 'https://github.com/overextended/ox_lib'
description 'A library of shared functions to utilise in other resources.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function lib.require(modname)
local di = debug.getinfo(idx, 'S')

if di then
if not di.short_src:find('^@ox_lib/imports/require') and not di.short_src:find('^%[C%]') and not di.short_src:find('^citizen') then
if not di.short_src:find('^@ox_lib/imports/require') and not di.short_src:find('^%[C%]') and not di.short_src:find('^citizen') and di.short_src ~= '?' then
resourceSrc = di.short_src:gsub('^@(.-)/.+', '%1')
break
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -81,7 +80,6 @@ function lib.showMenu(id, startIndex)
}
})
end

---@param onExit boolean?
function lib.hideMenu(onExit)
local menu = openMenu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ lib.addKeybind({
DisablePlayerFiring(cache.playerId, true)
DisableControlAction(0, 1, true)
DisableControlAction(0, 2, true)
DisableControlAction(0, 142, true)
DisableControlAction(2, 199, true)
DisableControlAction(2, 200, true)
Wait(0)
Expand Down

0 comments on commit 1047c12

Please sign in to comment.