Skip to content

Commit

Permalink
Merge branch 'main' into alcohol
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Feb 22, 2024
2 parents 2e24cb8 + 28c2bde commit cb754ee
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"sumneko.lua",
"overextended.cfxlua-vscode",
"ihyajb.qbcore-code-snippets",
"EditorConfig.EditorConfig",
]
}
10 changes: 7 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"Lua.runtime.nonstandardSymbol": ["/**/", "`", "+=", "-=", "*=", "/="],
"Lua.runtime.version": "Lua 5.4",
"Lua.diagnostics.globals": [
"cache",
"lib",
"QBX"
"cache",
"QBX",
"locale",
"qbx"
]
}
}
4 changes: 2 additions & 2 deletions server/consumables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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 @@ -28,7 +28,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 cb754ee

Please sign in to comment.