Text Scroller - Scroll text across screen [fax-textscroll] [1.0]


#1

Onscreen Text Scroll By FAXES

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.

This script was requested by @RBMercys and heres a link to the request - Server Update List



Requirements
None. This is a standalone script.

Video


Downloads:


Planned Feature(s)

  • Add config for colour and text without using .html file.
  • In config have direction of scroll
  • /togscroll to disable the text client side

Installation
Install like any resource.

Further Support
If you have any issues or comments please put them below. :pizza:


Server Update List
#2

This reminds me of the old days of learning HTML, the fancy marquee element :smiley:


#3

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 :slight_smile: )


#4

Great work man! give it a bit and we will probably see that scroll text on the news cast things for news jobs :stuck_out_tongue:


#5

It’s a deprecated element anyways :slight_smile:


#6

I remember using marquee :thinking:


#7

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.


#8

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.


#9

Your the Bast!!!..


#10

that “yet.” haha…

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…


#11

Thank you man! Appreciate it, this is very helpful. Love your work!


#12

nice good job man
(20 chars)


#13

Yes the command will probably come, it is already in the script but unfinished.


#14

Awesome man!..


#15

made a PR, i had a free hour at school so i tried to make the command.

side note: the command is only available for admins, so make sure you are one when you test lol


#16

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)


#17

Looks nice. I’m keeping as a html though and will not be converting to Lua anytime soon

@IceHax thanks for the info I’ll look into it :slight_smile: