This commit is contained in:
Nordi98 2025-07-28 23:39:25 +02:00
parent ec9ff993e4
commit a0b81a2e66
2 changed files with 61 additions and 16 deletions

View file

@ -140,3 +140,17 @@ function redeemPfand(selectedItems)
ShowNotification(_L('processing'))
TriggerServerEvent('pickle_consumables:server:redeemPfand', selectedItems)
end
-- modules/pfandsystem/client.lua (zusätzlicher Code)
-- Überwache Item-Nutzung
RegisterNetEvent('inventory:client:UseItem')
AddEventHandler('inventory:client:UseItem', function(item)
local itemName = type(item) == "table" and item.name or item
TriggerServerEvent('pickle_consumables:server:useItem', itemName)
end)
-- Überwache Pickle Consumables Item-Nutzung
AddEventHandler('pickle_consumables:useItem', function(itemName, slot)
TriggerServerEvent('pickle_consumables:server:useItem', itemName)
end)