feat(ui): Client-side wrapper

This commit is contained in:
dunak-debug committed 2021-12-27 12:59:14 +01:00
1 parent 8fb5ca2e8c
commit 0290ea17e3
22 files changed
+57 -14

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
RegisterNetEvent('oxmysql:openUi', function(data)
SendNUIMessage({
action = 'init',
data = data
})
SetNuiFocus(true, true)
end)
RegisterNUICallback('exit', function(_, cb)
cb(true)
end)
RegisterNUICallback('fetchResource', function(resource, cb)
TriggerServerEvent('oxmysql:fetchResource', resource)
cb(true)
end)
RegisterNetEvent('oxmysql:loadResource', function(data)
SendNUIMessage({
action = 'loadResource',
data = data
})
end)