[Help] Check if ShakeGameplayCam is true

Citizen.CreateThread(function()
  while true do
  Wait(0)
  local player = GetPlayerPed(-1)
  local Health = GetEntityHealth(player)

  if Health <= 139  then
    SetEntityHealth(ped,GetEntityHealth(ped)-1)
    if StartScreenEffect == false then
      StartScreenEffect('Rampage', 0, true)
    end
    if ShakeGameplayCam == false then
      ShakeGameplayCam("DRUNK_SHAKE", 1.0)
    end
    Wait(5000)
    
  elseif Health > 140 then
    StopScreenEffect('Rampage')
    StopGameplayCamShaking(false)
  end
end
end)

This is script for bleeding effect. How can I make it only set new ShakeGameplayCam and StartScreenEffect if there is none enabled? Because if it enables every tick it doesn’t look so good.

You can watch there because it seem to be the exact same script.

Yep, and this script works the way it is how you see in mine. And it looks kinda bad because every tick you get no screen effect for a second because it sets new effect every tick. This is why I want it to only set it once because it’s gonna look more smoother.

I’ve send a message to the original author for this.I supposed it to be fixed soon.If he don’t update the script i’ll help you to fix it.

1 Like

Check my updated release and again big thanks @mikou.

2 Likes