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.