mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(web): onSelect function for options
This commit is contained in:
@@ -52,9 +52,10 @@ RegisterNUICallback('clickContext', function(id, cb)
|
||||
id += 1
|
||||
end
|
||||
local data = contextMenus[openContextMenu].options[id]
|
||||
if not data.event and not data.serverEvent then return end
|
||||
if not data.event and not data.serverEvent and not data.onSelect then return end
|
||||
openContextMenu = nil
|
||||
SetNuiFocus(false, false)
|
||||
if data.onSelect then data.onSelect(data.args) end
|
||||
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