🧠Stress

Stress Management Functions

KOJA.Client.GetPlayerStress()

Returns the current stress level of the player.


koja-hud:addStress(value)

Increases the player's stress level by a specified amount.

Parameters:

  • value (number): The amount by which the player's stress will be increased. The value must be a positive number.


koja-hud:removeStress(value)

Decreases the player's stress level by a specified amount.

Parameters:

  • value (number): The amount by which the player's stress will be decreased. The value must be a positive number.


Example Usage:

-- Adding 10 stress points
TriggerEvent("koja-hud:addStress", 10)

-- Removing 5 stress points
TriggerEvent("koja-hud:removeStress", 5)

-- Getting the current player's stress level
local currentStress = KOJA.Client.GetPlayerStress()
print(currentStress)

Last updated