From 803c612cbb952682bf6f04635015b9961bbd4123 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Sat, 4 Oct 2025 19:12:50 +0100 Subject: [PATCH] Change stress to take away instead of increase --- shared/playerfunctions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/playerfunctions.lua b/shared/playerfunctions.lua index 8cc5615..87f9b64 100644 --- a/shared/playerfunctions.lua +++ b/shared/playerfunctions.lua @@ -86,7 +86,7 @@ local hungerThirstFunc = { setStress = function(src, stress) local Player = Core.Functions.GetPlayer(src) - local newStress = Player.PlayerData.metadata.stress + stress + local newStress = Player.PlayerData.metadata.stress - stress newStress = (newStress >= 100.0 and 100.0) or (newStress <= 0 and 0) or newStress Player.Functions.SetMetaData('stress', newStress) TriggerClientEvent('hud:client:UpdateStress', src, newStress) @@ -187,10 +187,10 @@ end) --- Server event handler for setting player needs (thirst or hunger). --- --- @event ---- @param type string "thirst" or "hunger". +--- @param needType string "thirst" or "hunger". --- @param amount number New value to set. RegisterNetEvent(getScript()..":server:setNeed", function(needType, amount) - print("^1Deprecated function ':server:setNeed' called, please update your scripts^7") + print("^1Deprecated function ':server:setNeed' called, please update the scripts that use it^7") -- local src = source -- if needType == "thirst" then -- setThirst(src, amount)