[RELEASE] [UPDATED 19.12.2019] Stress System with logs by utku, esx_status

I ended up deleting it because nothing but vibrations are emitted to me

there are only 2 explanations why that can happen: 1- you didn’t installed it as it should be, 2- you don’t have esx_staus

How could I place relaxation areas? to lower stress

Pick a locations and find it’s coords then determine it’s area of effect radius, create a simple resource that checks if players have entered it, when they do lower their stress by using exports

how is that?

here is a simple quick example: (not resource friendly tho)

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        local pedcoord = GetEntityCoords(PlayerPedId())
        local location = vector3(154.20, 224.15, 42.0) -- this is random
        
        if GetDistanceBetweenCoords(pedcoord, location, true) <= 50 then -- radius
            exports['stress_utk']:RemoveStress('slow', 300000, 25)
            Citizen.Wait(25000)
        end
    end
end)

thank you very much for your help so fast.

That Citizen.Wait(1) makes me wonder…this would be a little consuming…maybe make it 500 instead of 1 so it’s checked twice a second? so it’s like a little more scheduler-friendly maybe?

You’re really a damn boss, but a question. to change the speeds of rise and fall of stress, how would it be?

Oh I get it. Now my question is how to change the camera vibration for the animation of limping

I have a problem, when people enter the server for the first time they have maximum stress, how could I change it so that they have 0 stress when they first enter?

you need same database?

you don’t need any extra database thing, it only requires esx_status

i added it and i follow all the steps but when i eat something with stress add it dont get up, and when i shoot and everithing nothing happend, i check my status field from user in database but seems dont put stress in the field, i can see in the log.txt im getting stress but ingame i dont, u need to add manually something in status or what im doing wrong?, thanks

and then how is the script supposed to store the stress?

it stores at status in table"users", automatically done by esx_status

Hi, do you have any idea how i can add and remove stress by zones ? For exapmle, if i go to the vanila club, the stress goes down


this is your answer, find a center coordinate and determine the effective radius and implement it

Thanks, if i want to do that but with basic stress system, what i have to chage ? Basic= stress system with basicneeds and status.
It will work if i change the export part for TriggerServerEvent ?

yes that would work only if you register a stress status in esx_basicneeds but if you are using my script then exports are the best way