[RELEASE] Stress System with basicneeds

how can i make it increase when there is an gunfight?

In the end I have come to do this, I do not like the bar style if I did it by numbers. Thank you :blush:

2 Likes

Hello, can shared?

Thanks!!

Great work! :+1:

didnt worked.

Bro, how can I do when you have like an item called ā€œcigarā€ how can I do the animation of the Smoking on the item?

I donā€™t understand what you want to tell me

Look here at the forums - There are plenty of animation scripts you can choose to use, with an animation such as smoking.

Then, you could just make a check if itā€™s the smoking emote, if it is, then this code gets triggered:

TriggerClientEvent (ā€˜esx_status: removeā€™, source, ā€˜stressā€™, 100000)

Hello! I am trying that when I reach 100% I make the depressed animation, but when you reach 0% the depressed animation is removed, I currently have the code to myself, the case is that when you reach 100% if you make the depressed animation , but when I have it at 0, keep doing the animation and there is no way to remove it, the only way is F3 and normal walking

It worksā€¦ i run it on my serverā€¦ do you have drunk in esx_basicneeds?
Mby itā€™s not working for you because u donā€™t have a drunk stuff

can u share whole file ?? it would be awsome :heart_eyes:

You can try this code;

elseif stressVal <= 100000 then

ClearPedTask or StopAnimTask(ā€¦anim detailā€¦) etc.

but it may not be useful as stress walking is easily inactivated.

1 Like

Could you replace the stamina bar with a streess bar?

You mean yes?

possibly, if I finish it as I would like

Not ā€œ>=ā€ you can try ā€œ<=ā€.

Itā€™s only guess. Maybe work maybe not :slight_smile:

1 Like

That doesnt work I just tried

So i have a problem i have the stress working but i canā€™t remove the stress i have tried adding this TriggerClientEvent (ā€˜esx_status: removeā€™, source, ā€˜stressā€™, 100000) to my drug effect but when doing this it fails my drug script here is my effect i am doing.

onDrugs = true
TaskStartScenarioInPlace(playerPed, ā€œWORLD_HUMAN_SMOKING_POTā€, 0, 1)
TriggerClientEvent(ā€˜esx_status: removeā€™, source, ā€˜stressā€™, 100000)
Citizen.Wait(3000)
ClearPedTasksImmediately(playerPed)
SetTimecycleModifier(ā€œspectator5ā€)
SetPedMotionBlur(playerPed, true)
SetPedMovementClipset(playerPed, ā€œmove_m@hurry_butch@aā€, true)
local player = PlayerId()
AddArmourToPed(playerPed, 100)
local health = GetEntityHealth(playerPed)
local newHealth = math.min(maxHealth , math.floor(health + maxHealth/6))
SetEntityHealth(playerPed, newHealth)
onDrugs = false

Try this;

TriggerEvent(ā€˜esx_status: removeā€™, ā€˜stressā€™, 100000)

That did not work also :slight_smile:

1 Like