mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-17 06:26:03 +01:00
Fix reward item errors
This commit is contained in:
@@ -153,7 +153,7 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
|
|||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
if RewardItem then
|
if RewardItem then
|
||||||
for i = 1, Consumables[itemName].amounttogive do
|
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
|
while true do
|
||||||
local item = math.random(1, countTable(RewardItem)) -- random item in the list to pick
|
local item = math.random(1, countTable(RewardItem)) -- random item in the list to pick
|
||||||
if RewardItem[item].rarity >= rarity then
|
if RewardItem[item].rarity >= rarity then
|
||||||
|
|||||||
Reference in New Issue
Block a user