How can I make a textdrawbox to fade?
#1

How can I make a textdrawbox to fade?
Reply
#2

Set a timer and do something like this with intervals.
Код:
TextDrawColor(TD,0x000000FF);
TextDrawColor(TD,0x000000BB;
TextDrawColor(TD,0x00000077);
TextDrawColor(TD,0x00000033);
TextDrawColor(TD,0x00000000);
Reply
#3

Quote:
Originally Posted by Tamy
Посмотреть сообщение
Set a timer and do something like this with intervals.
Код:
TextDrawColor(TD,0x000000FF);
TextDrawColor(TD,0x000000BB;
TextDrawColor(TD,0x00000077);
TextDrawColor(TD,0x00000033);
TextDrawColor(TD,0x00000000);
I have something like this:
PHP код:
        TextDrawBoxColor(Textdraw0, -5963726);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963728);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963730);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963732);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963734);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963736);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963738);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963740);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963742);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963744);
        
TextDrawShowForPlayer(playeridTextdraw0);
        
TextDrawBoxColor(Textdraw0, -5963746);
        
TextDrawShowForPlayer(playeridTextdraw0); 
Reply
#4

Set a timer for it like this.

Код:
new FadingTextDraw[MAX_PLAYERS];
Use this to call the fading function.

Код:
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
Your fading function.
Код:
forward FadePlayerTextdrawBox(playerid);
public FadePlayerTextdrawBox(playerid)
{
        if(!FadingTextDraw[playerid])
        {
            TextDrawBoxColor(Textdraw0, -5963726);
        }
        else if(FadingTextDraw[playerid] == 1)
        {
            TextDrawBoxColor(Textdraw0, -5963728);

        }
        else if(FadingTextDraw[playerid] == 2)
        {
            TextDrawBoxColor(Textdraw0, -5963730);

        }
        else if(FadingTextDraw[playerid] == 3)
        {
            TextDrawBoxColor(Textdraw0, -5963732);

        }
        else if(FadingTextDraw[playerid] == 4)
        {
            TextDrawBoxColor(Textdraw0, -5963734);

        }
        else if(FadingTextDraw[playerid] == 5)
        {
            TextDrawBoxColor(Textdraw0, -5963736);

        }
        else if(FadingTextDraw[playerid] == 6)
        {
            TextDrawBoxColor(Textdraw0, -5963738);

        }
        else if(FadingTextDraw[playerid] == 7)
        {
            TextDrawBoxColor(Textdraw0, -5963740);

        }
        else if(FadingTextDraw[playerid] == 8)
        {
            TextDrawBoxColor(Textdraw0, -5963742);

        }
        else if(FadingTextDraw[playerid] == 9)
        {
            TextDrawBoxColor(Textdraw0, -5963744);
      
        }
        else if(FadingTextDraw[playerid] == 10)
		{
            TextDrawBoxColor(Textdraw0, -5963746);
        }
        FadingTextDraw[playerid]++;
        TextDrawShowForPlayer(playerid, Textdraw0);
        if(FadingTextDraw[playerid] < 10) SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
        return 1;
}
Reply
#5

Quote:
Originally Posted by Tamy
Посмотреть сообщение
Set a timer and do something like this with intervals.
Код:
TextDrawColor(TD,0x000000FF);
TextDrawColor(TD,0x000000BB;
TextDrawColor(TD,0x00000077);
TextDrawColor(TD,0x00000033);
TextDrawColor(TD,0x00000000);
Quote:
Originally Posted by Tamy
Посмотреть сообщение
Set a timer for it like this.

Код:
new FadingTextDraw[MAX_PLAYERS];
Use this to call the fading function.

Код:
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
Your fading function.
Код:
forward FadePlayerTextdrawBox(playerid);
public FadePlayerTextdrawBox(playerid)
{
        if(!FadingTextDraw[playerid])
        {
            TextDrawBoxColor(Textdraw0, -5963726);
        }
        else if(FadingTextDraw[playerid] == 1)
        {
            TextDrawBoxColor(Textdraw0, -5963728);

        }
        else if(FadingTextDraw[playerid] == 2)
        {
            TextDrawBoxColor(Textdraw0, -5963730);

        }
        else if(FadingTextDraw[playerid] == 3)
        {
            TextDrawBoxColor(Textdraw0, -5963732);

        }
        else if(FadingTextDraw[playerid] == 4)
        {
            TextDrawBoxColor(Textdraw0, -5963734);

        }
        else if(FadingTextDraw[playerid] == 5)
        {
            TextDrawBoxColor(Textdraw0, -5963736);

        }
        else if(FadingTextDraw[playerid] == 6)
        {
            TextDrawBoxColor(Textdraw0, -5963738);

        }
        else if(FadingTextDraw[playerid] == 7)
        {
            TextDrawBoxColor(Textdraw0, -5963740);

        }
        else if(FadingTextDraw[playerid] == 8)
        {
            TextDrawBoxColor(Textdraw0, -5963742);

        }
        else if(FadingTextDraw[playerid] == 9)
        {
            TextDrawBoxColor(Textdraw0, -5963744);
      
        }
        else if(FadingTextDraw[playerid] == 10)
		{
            TextDrawBoxColor(Textdraw0, -5963746);
        }
        FadingTextDraw[playerid]++;
        TextDrawShowForPlayer(playerid, Textdraw0);
        if(FadingTextDraw[playerid] < 10) SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
        return 1;
}
doesn't work man
Reply
#6

Try out the hexadecimals code I gave.

Код:
forward FadePlayerTextdrawBox(playerid);
public FadePlayerTextdrawBox(playerid)
{
        if(!FadingTextDraw[playerid]) TextDrawColor(Textdraw0,0x000000FF);
        else if(FadingTextDraw[playerid] == 1) TextDrawColor(Textdraw0,0x000000BB;
        else if(FadingTextDraw[playerid] == 2) TextDrawColor(Textdraw0,0x00000077);
        else if(FadingTextDraw[playerid] == 3) TextDrawColor(Textdraw0,0x00000033);
        else if(FadingTextDraw[playerid] == 4) TextDrawColor(Textdraw0,0x00000000);
        FadingTextDraw[playerid]++;
        TextDrawShowForPlayer(playerid, Textdraw0);
        if(FadingTextDraw[playerid] < 4) SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
        return 1;
}
Make sure you're calling it on the right time using

Код:
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
Reply
#7

can you give me all the hexadecimals code please ascendet please?
Reply
#8

www.colorpicker.com, I hope you'll find all your hexadecimal codes there
Reply
#9

search for textdraws.inc by gammix.
there you have an already made function TextDrawFade.
Reply
#10

This is where you should've been referred to the "Looking for Scripters/Helpers" thread, and not had random attempts to "help" pasted to you.


You learn nothing, and the code doesn't even work.

This is scripting help, not script for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)