Files
ox_lib/resource/interface/client/alert.lua
PoorLatency e93981fc95 feat(interface/alert): register net event (#41)
Allow the alert dialog to be called from server.
2022-06-17 10:23:56 +02:00

15 lines
294 B
Lua

function lib.alertDialog(data)
SetNuiFocus(true, true)
SendNUIMessage({
action = 'sendAlert',
data = data
})
end
RegisterNUICallback('closeAlert', function(_, cb)
cb(1)
SetNuiFocus(false, false)
end)
RegisterNetEvent('ox_lib:alertDialog', lib.alertDialog)