Skip to content

Commit

Permalink
chore(lint): fix unused and inacessible variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwerty1Verified committed Sep 6, 2024
1 parent d10f3a6 commit ff01fc4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
37 changes: 18 additions & 19 deletions client/drops.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local holdingDrop = false
holdingDrop = false
local bagObject = nil
local heldDrop = nil
CurrentDrop = nil
Expand All @@ -7,24 +7,23 @@ CurrentDrop = nil

function GetDrops()
QBCore.Functions.TriggerCallback('qb-inventory:server:GetCurrentDrops', function(drops)
if drops then
for k, v in pairs(drops) do
local bag = NetworkGetEntityFromNetworkId(v.entityId)
if DoesEntityExist(bag) then
exports['qb-target']:AddTargetEntity(bag, {
options = {
{
icon = 'fas fa-backpack',
label = Lang:t('menu.o_bag'),
action = function()
TriggerServerEvent('qb-inventory:server:openDrop', k)
CurrentDrop = dropId
end,
},
if not drops then return end
for k, v in pairs(drops) do
local bag = NetworkGetEntityFromNetworkId(v.entityId)
if DoesEntityExist(bag) then
exports['qb-target']:AddTargetEntity(bag, {
options = {
{
icon = 'fas fa-backpack',
label = Lang:t('menu.o_bag'),
action = function()
TriggerServerEvent('qb-inventory:server:openDrop', k)
CurrentDrop = k
end,
},
distance = 2.5,
})
end
},
distance = 2.5,
})
end
end
end)
Expand Down Expand Up @@ -59,7 +58,7 @@ RegisterNetEvent('qb-inventory:client:setupDropTarget', function(dropId)
label = 'Pick up bag',
action = function()
if IsPedArmed(PlayerPedId(), 4) then
return QBCore.Functions.Notify("You can not be holding a Gun and a Bag!", "error", 5500)
return QBCore.Functions.Notify("You can not be holding a Gun and a Bag!", "error", 5500)
end
if holdingDrop then
return QBCore.Functions.Notify("Your already holding a bag, Go Drop it!", "error", 5500)
Expand Down
1 change: 1 addition & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
QBCore = exports['qb-core']:GetCoreObject()
PlayerData = nil
local hotbarShown = false

-- Handlers
Expand Down

0 comments on commit ff01fc4

Please sign in to comment.