SA-MP Forums Archive
[Help]Blinking text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]Blinking text (/showthread.php?tid=331599)



[Help]Blinking text - Danny1 - 05.04.2012

Hi all I'm looking for code for blinking text some like this in video text "GTA MP.ADN.RU".Is this hard to set or easy?And how?

https://sampforum.blast.hk/showthread.php?pid=1010610#pid1010610


Re: [Help]Blinking text - blank. - 05.04.2012

Put TextDrawColor in a timer and give it a random color each time(or in a sequence).


Re: [Help]Blinking text - Danny1 - 05.04.2012

Ok then I need to define text like this:
Quote:

new Text:Example;

And then I need to put this code in "OnGameModeInit".

Quote:

public OnGameModeInit()
{
Example = TextDrawCreate(123.0, 123.0,"Example");
TextDrawColor(Example,0x000000FF);
return 1;
}

But here is some problems.This line
Quote:

Example = TextDrawCreate(123.0, 123.0,"Example");

This "Example" I edit in what text I want to be?And I set the colors in this line
Quote:

TextDrawColor(Example,0x000000FF);

this code
Quote:

0x000000FF

And how do I now set the timer,define timer and set the next color?


Re: [Help]Blinking text - Danny1 - 05.04.2012

Anywhone?


Re: [Help]Blinking text - DR3AD - 05.04.2012

This is just an idea, but what if you create a new function like
Код:
 forward TextDrawColorChange(textdraw);
public TextDrawColorChange(textdraw)
{
    TextDrawColor(textdraw,"any other color");
    return 1;
}
Then, GameModeInit you create a timer like this
Код:
SetTimerEx("TextDrawColorChange", 5000, true, "s", Example);
Every 5 seconds you have a new color.. I dont very well the signature of the function SetTimerEx, if is it wrong, correct me please


Re: [Help]Blinking text - Danny1 - 05.04.2012

Hey man.Your code is not good.In my script is answering errors.


Re: [Help]Blinking text - DR3AD - 05.04.2012

Quote:
Originally Posted by Danny1
Посмотреть сообщение
Hey man.Your code is not good.In my script is answering errors.
Post the errors here and I see what I can do