mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-16 22:16:02 +01:00
Fix pack and return items not being given
This commit is contained in:
@@ -120,11 +120,9 @@ RegisterNetEvent(getScript()..":server:finishConsume", function(needTypes)
|
|||||||
removeItem(isConsuming[src].item, 1, src)
|
removeItem(isConsuming[src].item, 1, src)
|
||||||
if isConsuming[src].rewardItem then
|
if isConsuming[src].rewardItem then
|
||||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2reward items^7")
|
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2reward items^7")
|
||||||
for i = 1, #isConsuming[src].rewardItem do
|
local item = isConsuming[src].rewardItem
|
||||||
local item = isConsuming[src].rewardItem[i]
|
|
||||||
addItem(item.item, item.amount, nil, src)
|
addItem(item.item, item.amount, nil, src)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if isConsuming[src].returnItem then
|
if isConsuming[src].returnItem then
|
||||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2return item^7")
|
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2return item^7")
|
||||||
for i = 1, #isConsuming[src].returnItem do
|
for i = 1, #isConsuming[src].returnItem do
|
||||||
@@ -133,12 +131,10 @@ RegisterNetEvent(getScript()..":server:finishConsume", function(needTypes)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if isConsuming[src].packItem then
|
if isConsuming[src].packItem then
|
||||||
for i = 1, #isConsuming[src].packItem do
|
|
||||||
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2Pack items^7")
|
debugPrint("^5Debug^7: ^2Giving player ^3"..src.." ^2Pack items^7")
|
||||||
local item = isConsuming[src].packItem[i]
|
local item = isConsuming[src].packItem
|
||||||
addItem(item.item, item.amount, nil, src)
|
addItem(item.item, item.amount, nil, src)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- Needs
|
-- Needs
|
||||||
if needTypes.thirst then
|
if needTypes.thirst then
|
||||||
|
|||||||
Reference in New Issue
Block a user