Zdravim , potřebuji pomoc s inventarem.
error :
error se ukáže vždy když použiju item , jde použit jednou a poté to napise nad mapou Impossible.
řádek :
163 - 168
Quote
function getCustomD(itemn)
local getitem = MySQL.Sync.fetchAll("SELECT * FROM items WHERE items.name =@name", {
['@name'] = itemn
})
return getitem[1].durability
end
errory na radku :
167 : return getitem[1].durability
232-254
Quote
AddEventHandler('esx:onAddInventoryItem', function(source, esxItem, count)
local player = ESX.GetPlayerFromId(source)
TriggerClientEvent('disc-inventoryhud:showItemUse', source, {
{ id = esxItem.name, label = esxItem.label, qty = count, msg = _U('added') }
})
applyToInventory(player.identifier, 'player', function(inventory)
if impendingAdditions[source] then
for k, addingItem in pairs(impendingAdditions[source]) do
if addingItem.id == esxItem.name and addingItem.count == count then
if addingItem.block then
impendingAdditions[source][k] = nil
return
end
end
end
end
local durability = getCustomD(esxItem.name)
local serie = getCustomSerie(esxItem.name)
local item = createItem(esxItem.name, count, durability, serie)
addToInventory(item, 'player', inventory, esxItem.limit)
TriggerClientEvent('disc-inventoryhud:refreshInventory', source)
end)
end)
errory na radku :
237 : applyToInventory(player.identifier, 'player', function(inventory)
248 : local durability = getCustomD(esxItem.name)
1249 - 1262
Quote
function applyToInventory(identifier, type, f)
if loadedInventories[type][identifier] ~= nil then
f(loadedInventories[type][identifier])
else
loadInventory(identifier, type, function()
applyToInventory(identifier, type, f)
end)
end
if loadedInventories[type][identifier] and table.length(loadedInventories[type][identifier]) > 0 then
TriggerEvent('disc-inventoryhud:modifiedInventory', identifier, type, loadedInventories[type][identifier])
else
TriggerEvent('disc-inventoryhud:modifiedInventory', identifier, type, nil)
end
end
errory na radku :
1251 : f(loadedInventories[type][identifier])
Zdravim , potřebuji pomoc s inventarem.

error :
error se ukáže vždy když použiju item , jde použit jednou a poté to napise nad mapou Impossible.
řádek :
163 - 168
232-254
1249 - 1262
Dekuji za rady a pomoc :)
Share this post
Link to post
Share on other sites