Update common.lua

This commit is contained in:
Thekuca
2023-05-23 11:29:50 +02:00
committed by GitHub
parent fab8f3aa74
commit 9ee4bcddf1
+1 -15
View File
@@ -40,26 +40,12 @@ end
MySQL.ready(function() MySQL.ready(function()
Core.DatabaseConnected = true 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.RefreshItems()
ESX.Items = items
end)
while not next(ESX.Items) do while not next(ESX.Items) do
Wait(0) Wait(0)
end end
end
ESX.RefreshJobs() ESX.RefreshJobs()