2022-06-11 11:33:15 +02:00
|
|
|
function lib.alertDialog(data)
|
|
|
|
|
SetNuiFocus(true, true)
|
|
|
|
|
SendNUIMessage({
|
|
|
|
|
action = 'sendAlert',
|
|
|
|
|
data = data
|
|
|
|
|
})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
RegisterNUICallback('closeAlert', function(_, cb)
|
|
|
|
|
cb(1)
|
|
|
|
|
SetNuiFocus(false, false)
|
2022-06-17 01:23:56 -07:00
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
RegisterNetEvent('ox_lib:alertDialog', lib.alertDialog)
|