About
This is a simple script that displays scrolling text (right-left) at the top of the screen. This text is customisable and same with the colour and font. This script is not 100% to where I would like it but it is functioning and works well. The text has very little lag, you can look below for some planned features.
At this stage the text only is made to work at the top of the screen, but I may update in the future.
Yes true. I whipped this up in a couple hours. But its not marquee its mainly via css and keyframes. When I tested marquee it had more laggier text then the css way. But those days were good (days being a few moths ago )
Seeing that this is html/css I don’t figure having a command to add text to the scroll would be too easy, huh?
Would be kinda cool to, as hinted at above, have those who are news reporters be able to add text to the marquee through a command and maybe have a maximum limit to the number of blurbs scrolling across.
Its a command to remove the text off of your screen. And the message can only be updated via html so one could not do say /scroll my new messge here. Yet.
Its already awesome as is but… having a command such as /scroll would make it 11/10. I would imagine it would require a pretty heavy rewrite though and make a small script into a massive project.
Possibly not worth the work unless its for the learning experience…
function breakingnews()
scaleform = RequestScaleformMovie(“breaking_news”)
while not HasScaleformMovieLoaded(scaleform) do
Citizen.Wait(0)
end
PushScaleformMovieFunction(scaleform, "SET_TEXT")
PushScaleformMovieFunctionParameterString("Quit")
PushScaleformMovieFunctionParameterString("<b>Bold</b> <i>Italics</i> ~r~Coloured ~d~")
PopScaleformMovieFunctionVoid()
PushScaleformMovieFunction(scaleform, "SET_SCROLL_TEXT")
PushScaleformMovieFunctionParameterInt(0) -- top ticker
PushScaleformMovieFunctionParameterInt(0) -- Since this is the first string, start at 0
PushScaleformMovieFunctionParameterString("This will be displayed at the top")
PopScaleformMovieFunctionVoid()
PushScaleformMovieFunction(scaleform, "DISPLAY_SCROLL_TEXT")
PushScaleformMovieFunctionParameterInt(0) -- Top ticker
PushScaleformMovieFunctionParameterInt(0) -- Index of string
PopScaleformMovieFunctionVoid()
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
breakingnews()
end
end)