How make this?(ChangeColor)
#1

How change TDcolor every 1-2 seconds?

http://www.youtube.com/watch?v=fR9J9...ature=*********
Reply
#2

It can be achieved through a timer. Something like this, if you're using y_timers.

pawn Код:
task autoChangeColor[1000]()
{
    switch(g_ColorTD)
    {
        case 0:
        {
            TextDrawSetString(..);
            g_ColorTD++;
        }
        case 1:
        {
            TextDrawSetString(..);
            g_ColorTD++;
        }
        case 2:
        {
            TextDrawSetString(..);
            g_ColorTD++;
        }
        case 3:
        {
            TextDrawSetString(..);
            g_ColorTD++;
        }
        case 4:
        {
            TextDrawSetString(..);
            g_ColorTD = 0;
        }
    }
    return 1;
}
Reply
#3

Mm, that code changes TextString, not color.

Btw: thanks for timer
Reply
#4

Right. Well, in the video you gave it only changed the color of particular characters, not the whole textdraw. Therefore, you'd have to do that with TextDrawSetString().
Reply
#5

Код:
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "g_ColorTD"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "g_ColorTD"
 : warning 215: expression has no effect
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "g_ColorTD"
 : warning 215: expression has no effect
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "g_ColorTD"
 : warning 215: expression has no effect
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "i"
 : error 017: undefined symbol "g_ColorTD"
 : warning 215: expression has no effect
pawn Код:
task autoChangeColor[1000]()
{
    switch(g_ColorTD)
    {
        case 0:
        {
            TextDrawSetString(LogoTD[i][1], "~g~RO");
            g_ColorTD++;
        }
        case 1:
        {
            TextDrawSetString(LogoTD[i][1], "RO");
            TextDrawSetString(LogoTD[i][2], "~g~O");
            g_ColorTD++;
        }
        case 2:
        {
            TextDrawSetString(LogoTD[i][1], "~g~RO");
            TextDrawSetString(LogoTD[i][2], "O");
            g_ColorTD++;
        }
        case 3:
        {
            TextDrawSetString(LogoTD[i][1], "RO");
            TextDrawSetString(LogoTD[i][2], "~g~O");
            g_ColorTD++;
        }
    }
    return 1;
}
Reply
#6

bump
Reply
#7

try to use a Timer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)