mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
21 lines
533 B
Lua
21 lines
533 B
Lua
RegisterNUICallback('saveConfig', function(data, cb)
|
|
local file = data.file
|
|
local configData = data.data
|
|
TriggerServerEvent('qb-core:server:configEditor', file, configData)
|
|
print('Saving config for file:', file)
|
|
cb('ok')
|
|
end)
|
|
|
|
RegisterNUICallback('closeEditor', function(data, cb)
|
|
SetNuiFocus(false, false)
|
|
cb('ok')
|
|
end)
|
|
|
|
RegisterNetEvent('qb-core:client:configEditor', function(allData)
|
|
SendNUIMessage({
|
|
action = 'populateData',
|
|
data = allData
|
|
})
|
|
SetNuiFocus(true, true)
|
|
end)
|