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
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
Anyone have a way of adding stress when you kill someone i couldn’t figure it out and i tried to do it through deathevents but that triggers it for the player that you kill
Nahhh did not work and for some reason i can’t get it to work whenever i add the code to jk drug’s on smoking pot to remove stress it brakes the resource.
For add:
For clientside: TriggerEvent(‘esx_status:add’, ‘stress’, 100000)
For serverside: TriggerClientEvent (‘esx_status:add’, source, ‘stress’, 100000)
For remove:
For clientside: TriggerEvent(‘esx_status:remove’, ‘stress’, 100000)
For serverside: TriggerClientEvent (‘esx_status:remove’, source, ‘stress’, 100000)
Right so i have tried all sorts of stuff and no matter what i do i can’t get stress to remove it go’s up on its own quick then i am stuck with the shaking screen and all that and if i add any of them codes to jk_drug’s server or client use joint it just brakes the resource and if i add a use joint function to with any of them codes on esx_optionalneeds server or client i use the joint and it don’t take stress away but i get the drug effects from jk_drugs and can’t see why this is not working other than having stress all the time like the only way i have been able to remove stress is after dying and being admin revived so not sure what going on.