Skip to content

Commit 493d5b7

Browse files
committed
editor callbacks
1 parent e8dc8f8 commit 493d5b7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

client/editor.lua

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
RegisterNUICallback('saveConfig', function(data, cb)
2+
local file = data.file
3+
local configData = data.data
4+
TriggerServerEvent('qb-core:server:configEditor', file, configData)
5+
print("Saving config for file:", file)
6+
cb('ok')
7+
end)
8+
9+
RegisterNUICallback('closeEditor', function(data, cb)
10+
SetNuiFocus(false, false)
11+
cb('ok')
12+
end)
13+
14+
RegisterNetEvent('qb-core:client:configEditor', function(allData)
15+
SendNUIMessage({
16+
action = 'populateData',
17+
data = allData
18+
})
19+
SetNuiFocus(true, true)
20+
end)

0 commit comments

Comments
 (0)