fix(client/context): Allow using events to open context menus

There was an issue where if you wanted to open a second context menu using args from the first context menu's item with events, the nui focus would get stuck beacuse it would get set by the event.
This commit is contained in:
Luke
2022-04-15 11:18:05 +02:00
parent 8ef1b876e1
commit c21054280c

View File

@@ -35,10 +35,10 @@ end)
RegisterNUICallback('clickContext', function(data, cb)
cb(1)
SetNuiFocus(false, false)
if data.event then TriggerEvent(data.event, data.args) end
if data.serverEvent then TriggerServerEvent(data.serverEvent, data.args) end
openContextMenu = nil
SetNuiFocus(false, false)
SendNUIMessage({
action = 'hideContext'
})