From 8cf412c266233722218ceb930b7a36267fe86183 Mon Sep 17 00:00:00 2001 From: Kotzu Date: Thu, 2 Apr 2026 00:26:24 +0300 Subject: [PATCH] fix(qs-inventory): pcall pe handleDeleteItem qs-smartphone-pro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export-ul handleDeleteItem nu există în versiunea curentă de qs-smartphone-pro. Wrappat cu pcall pe liniile 84, 117, 154 din RemoveItem.lua ca să nu mai blocheze equip/unequip de haine. --- .../[quasar]/qs-inventory/server/custom/misc/RemoveItem.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/server/custom/misc/RemoveItem.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/server/custom/misc/RemoveItem.lua index 88278c82..79e84e09 100644 --- a/resources/[framework]/[addons]/[quasar]/qs-inventory/server/custom/misc/RemoveItem.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/server/custom/misc/RemoveItem.lua @@ -81,7 +81,7 @@ function RemoveItem(source, item, amount, slot, metadata, disableAutoShowBox) for _, _slot in pairs(slots) do if inventory[_slot].amount > amountToRemove then if SmartphoneMetadata then - exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) + pcall(function() exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) end) end TriggerEvent('esx:onRemoveInventoryItem', source, item, amount) TriggerClientEvent('esx:removeInventoryItem', source, item, amount) @@ -114,7 +114,7 @@ function RemoveItem(source, item, amount, slot, metadata, disableAutoShowBox) return true elseif inventory[_slot].amount == amountToRemove then if SmartphoneMetadata then - exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) + pcall(function() exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) end) end TriggerEvent('esx:onRemoveInventoryItem', source, item, amount) TriggerClientEvent('esx:removeInventoryItem', source, item, amount) @@ -151,7 +151,7 @@ function RemoveItem(source, item, amount, slot, metadata, disableAutoShowBox) inventory[_slot].amount = _quantity SetInventoryItems(source, inventory[_slot].name, _quantity) if SmartphoneMetadata then - exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) + pcall(function() exports['qs-smartphone-pro']:handleDeleteItem(source, inventory[_slot]) end) end if not ContainsItem(itemsToCheck, item) then