mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:01:24 +00:00
feat (Shared): Added the ability to dynamically update the shared jobs, items and gangs.
This commit is contained in:
@@ -140,3 +140,16 @@ RegisterNetEvent('QBCore:Command:ShowMe3D', function(senderId, msg)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Listen to Shared being updated
|
||||
RegisterNetEvent('QBCore:Client:OnSharedUpdate', function(tableName, key, value)
|
||||
QBCore.Shared[tableName][key] = value
|
||||
TriggerEvent('QBCore:Client:UpdateObject')
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnSharedUpdateMultiple', function(tableName, values)
|
||||
for key, value in ipairs(values) do
|
||||
QBCore.Shared[tableName][key] = value
|
||||
end
|
||||
TriggerEvent('QBCore:Client:UpdateObject')
|
||||
end)
|
||||
Reference in New Issue
Block a user