Evrything works but when you target the prop it removes it but you won’t get the item back.
Also if you have 2 items and you place 1 on the ground, when you target the prop it will remove it from the ground but also from inventory.
I think I found the culprit
local src = source
MySQL.query('DELETE FROM `halloween_objects` WHERE ID LIKE ?', { id })
updateObjects()
if Config.Core == 'qb' then
local Player = Core.Functions.GetPlayer(src)
Player.Functions.AddItem(item, 1)
else
local Player = ESX.GetPlayerFromId(src)
---- Player.removeInventoryItem(item, 1) ---- Removes the item from the ground + inventory
Player.addInventoryItem(item, 1) --- Remove the Prop and add to inventory
end
end)````