Fix reward item errors

This commit is contained in:
Jim Shield
2023-03-27 18:59:56 +01:00
committed by GitHub
parent d60a93448d
commit 11f479d8f8

View File

@@ -153,7 +153,7 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
CreateThread(function()
if RewardItem then
for i = 1, Consumables[itemName].amounttogive do
local rarity = math.random(1, countTable(Config.Rarity)) -- rarity calculation
local rarity = math.random(1, 4) -- rarity calculation
while true do
local item = math.random(1, countTable(RewardItem)) -- random item in the list to pick
if RewardItem[item].rarity >= rarity then