mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Update common.lua
This commit is contained in:
@@ -40,25 +40,11 @@ end
|
||||
|
||||
MySQL.ready(function()
|
||||
Core.DatabaseConnected = true
|
||||
if not Config.OxInventory then
|
||||
local items = MySQL.query.await('SELECT * FROM items')
|
||||
for k, v in ipairs(items) do
|
||||
ESX.Items[v.name] = {label = v.label, weight = v.weight, rare = v.rare, canRemove = v.can_remove}
|
||||
end
|
||||
else
|
||||
TriggerEvent('__cfx_export_ox_inventory_Items', function(ref)
|
||||
if ref then
|
||||
ESX.Items = ref()
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('ox_inventory:itemList', function(items)
|
||||
ESX.Items = items
|
||||
end)
|
||||
ESX.RefreshItems()
|
||||
|
||||
while not next(ESX.Items) do
|
||||
Wait(0)
|
||||
end
|
||||
while not next(ESX.Items) do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
ESX.RefreshJobs()
|
||||
|
||||
Reference in New Issue
Block a user