mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
fix(property/server): RegisterStash on inventory restart
This commit is contained in:
@@ -142,6 +142,17 @@ MySQL.ready(function()
|
||||
end)
|
||||
end)
|
||||
|
||||
if Config.OxInventory then
|
||||
AddEventHandler('onServerResourceStart', function(resource)
|
||||
if resource == 'ox_inventory' then
|
||||
for i=1, #Config.Properties do
|
||||
local property = Config.Properties[i]
|
||||
exports.ox_inventory:RegisterStash(property.name, property.label, 50, 100000, true)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
ESX.RegisterServerCallback('esx_property:getProperties', function(source, cb)
|
||||
cb(Config.Properties)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user