Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage authored Jul 25, 2024
2 parents ce2ddfd + 14ea2b4 commit 0829e03
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,21 @@ AddEventHandler('onResourceStart', function(resourceName)
QBCore.Functions.AddPlayerMethod(k, 'SetInventory', function(items)
SetInventory(k, items)
end)

Player(k).state.inv_busy = false
end
end)

-- Events

RegisterNetEvent('qb-inventory:server:openVending', function()
RegisterNetEvent('qb-inventory:server:openVending', function(data)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
CreateShop({
name = 'vending',
label = 'Vending Machine',
coords = vendingMachineCoords,
coords = data.coords,
slots = #Config.VendingItems,
items = Config.VendingItems
})
Expand Down Expand Up @@ -426,7 +428,7 @@ local function getItem(inventoryId, src, slot)
if targetPlayer then
item = targetPlayer.PlayerData.items[slot]
end
elseif inventoryId:find('drop-') then
elseif inventoryId:find('drop-') == 1 then
item = Drops[inventoryId]['items'][slot]
else
item = Inventories[inventoryId]['items'][slot]
Expand Down

0 comments on commit 0829e03

Please sign in to comment.