[Ajuda] TextDraws muda de cor
#3

Faзa o uso de um timer, juntamente a uma lista de cores armazenadas em uma variбvel, e quando o timer for chamado, alterarб a cor da TextDraw consecutivamente.

Exemplo:
pawn Код:
new Text:TextDraw;
new Cor;

forward Alterarcolor();

new corestxd[2] =
{
    Cor1,
    Cor2
};

public OnGameModeInit()
{
    TextDraw = TextDrawCreate(240.0,580.0,"Welcome to my SA-MP server");
    TextDrawColor(TextDraw, 0x000000FF);

    SetTimer("Alterarcolor", 1000, true);
    return 1;
}

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, TextDraw);
    return 1;
}

public Alterarcolor()
{
    if(Cor > sizeof(corestxd)) Cor = 0;
    TextDrawColor(TextDraw, corestxd[cor]);
    Cor++;
}
Espero ter ajudado
Reply


Messages In This Thread
TextDraws muda de cor - by Alwe - 06.09.2014, 15:07
Re: TextDraws muda de cor - by Marlon307 - 06.09.2014, 15:15
Re: TextDraws muda de cor - by Bruno13 - 07.09.2014, 01:28
Re: TextDraws muda de cor - by Alwe - 07.09.2014, 13:22

Forum Jump:


Users browsing this thread: 2 Guest(s)