Skip to content

Commit

Permalink
dupe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
katotekii committed Nov 14, 2023
1 parent 67e905b commit 9598a87
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,15 @@ RegisterNetEvent('uniq_vending:SetUpStore', function(store)
Wait(300)
local items = exports.ox_inventory:GetInventoryItems(store, false)
local inventory = {}

if table.type(items) ~= 'empty' then
for k,v in pairs(items) do
inventory[#inventory + 1] = { name = v.name, metadata = v.metadata, price = v.metadata.price, currency = v.metadata.currency, count = v.count }
end

exports.ox_inventory:RegisterShop(store, {
name = store,
inventory = inventory,
})

for k,v in pairs(items) do
inventory[#inventory + 1] = { name = v.name, metadata = v.metadata, price = v.metadata.price, currency = v.metadata.currency, count = v.count }
end

exports.ox_inventory:RegisterShop(store, {
name = store,
inventory = inventory,
})
end)

local function SetUpHooks(inventoryFilter)
Expand Down

0 comments on commit 9598a87

Please sign in to comment.