PDA

View Full Version : [Help]Blinking text


Danny1
05/04/2012, 12:10 PM
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?

http://forum.sa-mp.com/showthread.php?p=1010610

blank.
05/04/2012, 12:21 PM
Put TextDrawColor (http://wiki.sa-mp.com/wiki/TextDrawColor) in a timer and give it a random color each time(or in a sequence).

Danny1
05/04/2012, 12:32 PM
Ok then I need to define text like this: new Text:Example;

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

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

But here is some problems.This line 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 TextDrawColor(Example,0x000000FF);this code 0x000000FF

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

Danny1
05/04/2012, 01:07 PM
Anywhone?

DR3AD
05/04/2012, 01:15 PM
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

Danny1
05/04/2012, 01:49 PM
Hey man.Your code is not good.In my script is answering errors.

DR3AD
05/04/2012, 01:51 PM
Hey man.Your code is not good.In my script is answering errors.

Post the errors here and I see what I can do