From fef0fde5a798f60727f9b5edfc6d3717904ba2c2 Mon Sep 17 00:00:00 2001 From: Antony <97451137+TonybynMp4@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:27:21 +0200 Subject: [PATCH] stress serverside --- server/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.lua b/server/main.lua index b780b1a..2bad719 100644 --- a/server/main.lua +++ b/server/main.lua @@ -33,6 +33,7 @@ for alcohol, params in pairs(config.alcoholItems) do exports.qbx_core:Notify(source, 'You feel like you can handle your liquor better now', 'success') end + playerState:set('stress', lib.math.clamp(playerState.stress - math.random(params.stressRelief.min, params.stressRelief.max), 0, 100), true) TriggerClientEvent('hud:client:UpdateNeeds', source, playerState.thirst, sustenance) end) end