Skip to content

fix: More then 1 Bag can be Picked Up at the same time. #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
36 changes: 20 additions & 16 deletions client/drops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,26 @@ RegisterNetEvent('qb-inventory:client:setupDropTarget', function(dropId)
icon = 'fas fa-hand-pointer',
label = 'Pick up bag',
action = function()
AttachEntityToEntity(
bag,
PlayerPedId(),
GetPedBoneIndex(PlayerPedId(), Config.ItemDropObjectBone),
Config.ItemDropObjectOffset[1].x,
Config.ItemDropObjectOffset[1].y,
Config.ItemDropObjectOffset[1].z,
Config.ItemDropObjectOffset[2].x,
Config.ItemDropObjectOffset[2].y,
Config.ItemDropObjectOffset[2].z,
true, true, false, true, 1, true
)
bagObject = bag
holdingDrop = true
heldDrop = newDropId
exports['qb-core']:DrawText('Press [G] to drop the bag')
if not holdingDrop then
AttachEntityToEntity(
bag,
PlayerPedId(),
GetPedBoneIndex(PlayerPedId(), Config.ItemDropObjectBone),
Config.ItemDropObjectOffset[1].x,
Config.ItemDropObjectOffset[1].y,
Config.ItemDropObjectOffset[1].z,
Config.ItemDropObjectOffset[2].x,
Config.ItemDropObjectOffset[2].y,
Config.ItemDropObjectOffset[2].z,
true, true, false, true, 1, true
)
bagObject = bag
holdingDrop = true
heldDrop = newDropId
exports['qb-core']:DrawText('Press [G] to drop the bag')
else
QBCore.Functions.Notify(Lang:t('notify.c_pu_bag'), 'error')
end
end,
}
},
Expand Down
1 change: 1 addition & 0 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ local Translations = {
['cgitem'] = 'Can\'t give item!',
['idne'] = 'Item Does Not Exist',
['pdne'] = 'Player Is Not Online',
['c_pu_bag'] = 'Cannot carry the bag.',
},
inf_mapping = {
['opn_inv'] = 'Open Inventory',
Expand Down
Loading