mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-19 15:36:05 +01:00
if
This commit is contained in:
@@ -255,7 +255,7 @@ RegisterNetEvent('jim-consumables:Consume', function(itemName)
|
|||||||
if not QBCore.Shared.Items[itemName].thirst and not QBCore.Shared.Items[itemName].hunger then
|
if not QBCore.Shared.Items[itemName].thirst and not QBCore.Shared.Items[itemName].hunger then
|
||||||
local hunger = 0
|
local hunger = 0
|
||||||
local thirst = 0
|
local thirst = 0
|
||||||
if if Config.Consumables[itemName].stats then
|
if Config.Consumables[itemName].stats then
|
||||||
if Config.Consumables[itemName].stats.hunger then hunger = Config.Consumables[itemName].stats.hunger end
|
if Config.Consumables[itemName].stats.hunger then hunger = Config.Consumables[itemName].stats.hunger end
|
||||||
TriggerServerEvent("QBCore:Server:SetMetaData", "hunger", QBCore.Functions.GetPlayerData().metadata["hunger"] + hunger)
|
TriggerServerEvent("QBCore:Server:SetMetaData", "hunger", QBCore.Functions.GetPlayerData().metadata["hunger"] + hunger)
|
||||||
if Config.Consumables[itemName].stats.thirst then thirst = Config.Consumables[itemName].stats.thirst end
|
if Config.Consumables[itemName].stats.thirst then thirst = Config.Consumables[itemName].stats.thirst end
|
||||||
@@ -349,4 +349,4 @@ CreateThread(function()
|
|||||||
Wait(2000)
|
Wait(2000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user