29.01.2016, 12:34
How can I make a textdrawbox to fade?
TextDrawColor(TD,0x000000FF); TextDrawColor(TD,0x000000BB; TextDrawColor(TD,0x00000077); TextDrawColor(TD,0x00000033); TextDrawColor(TD,0x00000000);
|
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); |
TextDrawBoxColor(Textdraw0, -5963726);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963728);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963730);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963732);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963734);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963736);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963738);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963740);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963742);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963744);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawBoxColor(Textdraw0, -5963746);
TextDrawShowForPlayer(playerid, Textdraw0);
new FadingTextDraw[MAX_PLAYERS];
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
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;
}
|
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); |
|
Set a timer for it like this.
Код:
new FadingTextDraw[MAX_PLAYERS]; Код:
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);
Код:
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;
}
|
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;
}
SetTimerEx("FadePlayerTextdrawBox", 200, false, "i", playerid);