Skip to content

Commit

Permalink
fix: use the correct args (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Feb 22, 2024
1 parent 77975f6 commit 28c2bde
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/consumables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ for alcohol, params in pairs(sharedConfig.consumables.alcohol) do
local sustenance = player.PlayerData.metadata.thirst + math.random(params.min, params.max)
player.Functions.SetMetaData('thirst', sustenance)

TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.thirst, sustenance)
TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.hunger, sustenance)
end)
end

Expand All @@ -28,7 +28,7 @@ for drink, params in pairs(sharedConfig.consumables.drink) do
local sustenance = player.PlayerData.metadata.thirst + math.random(params.min, params.max)
player.Functions.SetMetaData('thirst', sustenance)

TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.thirst, sustenance)
TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.hunger, sustenance)
end)
end

Expand All @@ -44,7 +44,7 @@ for food, params in pairs(sharedConfig.consumables.food) do
local sustenance = player.PlayerData.metadata.hunger + math.random(params.min, params.max)
player.Functions.SetMetaData('hunger', sustenance)

TriggerClientEvent('hud:client:UpdateNeeds', source, player.PlayerData.metadata.hunger, sustenance)
TriggerClientEvent('hud:client:UpdateNeeds', source, sustenance, player.PlayerData.metadata.thirst)
end)
end

Expand Down

0 comments on commit 28c2bde

Please sign in to comment.