Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ end)

RegisterNetEvent('qb-inventory:server:updateDrop', function(dropId, coords)
Drops[dropId].coords = coords
local entity = NetworkGetEntityFromNetworkId(Drops[dropId].entityId)
if DoesEntityExist(entity) then
SetEntityRoutingBucket(entity, GetPlayerRoutingBucket(source))
end
end)

RegisterNetEvent('qb-inventory:server:snowball', function(action)
Expand Down Expand Up @@ -364,6 +368,7 @@ QBCore.Functions.CreateCallback('qb-inventory:server:createDrop', function(sourc
if item.type == 'weapon' then checkWeapon(src, item) end
TaskPlayAnim(playerPed, 'pickup_object', 'pickup_low', 8.0, -8.0, 2000, 0, 0, false, false, false)
local bag = CreateObjectNoOffset(Config.ItemDropObject, playerCoords.x + 0.5, playerCoords.y + 0.5, playerCoords.z, true, true, false)
SetEntityRoutingBucket(bag, GetPlayerRoutingBucket(src))
local dropId = NetworkGetNetworkIdFromEntity(bag)
local newDropId = 'drop-' .. dropId
local itemsTable = setmetatable({ item }, {
Expand Down
Loading