mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(interface/context): don't hide menu when there is no event
This commit is contained in:
@@ -36,10 +36,11 @@ end)
|
||||
|
||||
RegisterNUICallback('clickContext', function(id, cb)
|
||||
cb(1)
|
||||
SetNuiFocus(false, false)
|
||||
if tonumber(id) then id += 1 end
|
||||
local data = contextMenus[openContextMenu].options[id]
|
||||
if not data.event and not data.serverEvent then return end
|
||||
openContextMenu = nil
|
||||
SetNuiFocus(false, false)
|
||||
if data.event then TriggerEvent(data.event, data.args) end
|
||||
if data.serverEvent then TriggerServerEvent(data.serverEvent, data.args) end
|
||||
SendNUIMessage({
|
||||
|
||||
Reference in New Issue
Block a user