diff --git a/README.md b/README.md index d47dfaa..b119377 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,6 @@ This resource was created as a free script for backpacks using ox_inventory - Customizable item name and storage parameters - Compatibility for ESX -## Known bugs -- Only ESX compatible - ## Installation - Download this script diff --git a/fxmanifest.lua b/fxmanifest.lua index 5fe326c..b66c7b1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' lua54 'yes' description 'Wasabi Backpack for Ox Inventory' -version '1.0.6' +version '1.0.7' client_scripts { 'client/**.lua' diff --git a/server/server.lua b/server/server.lua index 7be4acc..3c412ac 100644 --- a/server/server.lua +++ b/server/server.lua @@ -52,23 +52,25 @@ CreateThread(function() local count_bagpacks = 0 local fromInv, toInv, move_type = payload.fromInventory, payload.toInventory, payload.toType + print(payload.fromSlot.name) for vbag in pairs(Config.Backpacks) do count_bagpacks = count_bagpacks + ox_inventory:GetItemCount(payload.source, vbag, nil, false) end if Config.Debug then print("Count: " .. count_bagpacks) print("Toinv: " .. toInv) + print("fromInv: "..fromInv) print("Movetype: " .. move_type) end - if string.find(toInv, 'bag') then + if string.find(toInv, 'bag') and string.find(payload.fromSlot.name, 'bag') then TriggerClientEvent('ox_lib:notify', payload.source, { type = 'error', title = Strings.action_incomplete, description = Strings.backpack_in_backpack }) return false end if Config.OneBagInInventory then - if (move_type == "player" and count_bagpacks > 0 and toinv ~= fromInv) then + if (move_type == "player" and count_bagpacks > 0 and toinv ~= fromInv) and string.find(payload.fromSlot.name, 'bag') then TriggerClientEvent('ox_lib:notify', payload.source, { type = 'error', title = Strings.action_incomplete, description = Strings.one_backpack_only }) return false