mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
feat(ui): Client-side wrapper
This commit is contained in:
1 parent
8fb5ca2e8c
commit
0290ea17e3
22 files changed
+57
-14
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user