woops
fix hopefully oxlib menu compat
This commit is contained in:
1 parent
e080f39332
commit
848864d686
1 file changed
+5
-2
@@ -1,5 +1,5 @@
|
|||||||
if GetResourceState('ox_lib') ~= 'started' and (BridgeClientConfig.MenuSystem ~= "ox" or BridgeClientConfig.MenuSystem ~= "auto") then return end
|
if GetResourceState('ox_lib') ~= 'started' and (BridgeClientConfig.MenuSystem ~= "ox" or BridgeClientConfig.MenuSystem ~= "auto") then return end
|
||||||
|
Menus = Menus or {}
|
||||||
--- Converts a QB menu to an Ox menu.
|
--- Converts a QB menu to an Ox menu.
|
||||||
---@param id string The menu ID.
|
---@param id string The menu ID.
|
||||||
---@param menu table The QB menu data.
|
---@param menu table The QB menu data.
|
||||||
@@ -47,6 +47,9 @@ OpenMenu = function(id, data, useQBinput)
|
|||||||
if useQBinput then
|
if useQBinput then
|
||||||
data = QBToOxMenu(id, data)
|
data = QBToOxMenu(id, data)
|
||||||
end
|
end
|
||||||
exports['qb-menu']:openMenu(data)
|
if not Menus[id] then
|
||||||
|
lib.registerContext(data)
|
||||||
|
end
|
||||||
|
lib.showContext(id)
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user