For graphics.StartScreenEffect(name, play_lenght, loop) => play_lenght is how long to play the effect for in milliseconds. If 0, it plays the default length
if IsKeyDown(KEY_F9) then
local newScreenEffect = screenEffect[screenEffectIndex]
local oldScreenEffect = screenEffect[screenEffectIndex - 1]
if graphics.ScreenEffectIsActive(oldScreenEffect or "") then
graphics.StopScreenEffect(oldScreenEffect)
gui.NotifyAboveMap("Disable " .. oldScreenEffect)
end
graphics.StartScreenEffect(screenEffect[screenEffectIndex])
gui.NotifyAboveMap("Enable " .. screenEffect[screenEffectIndex])
screenEffectIndex = screenEffectIndex + 1
if screenEffectIndex > #screenEffect then screenEffectIndex = 1 end
end
Thanks to Tiryll (http://gtaforums.com/topic/796638-screen-fx/)
For graphics.StartScreenEffect(name, play_lenght, loop) => play_lenght is how long to play the effect for in milliseconds. If 0, it plays the default length
Screen Effect List
TRY ME
In your Run() function
In your loop (while self:IsRunning() do)