How to make a player's colour flash?
#1

I tried setting a timer to make a wanted player's name flash, but didn't work. Maybe I did it wrong, but I don't think I did. Is it even possible to flash their name? I'm sure it is
Reply
#2

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
Maybe I did it wrong, but I don't think I did. Is it even possible to flash their name? I'm sure it is
You answered yourself.

I remember a function on Ladmin wich changes the colour from red to green every second. Check it
Reply
#3

pawn Код:
SetTimer("FlashPlayerName", 1000, true); //OnGameModeInit

forward FlashPlayerName(); //Some where in script 'v'
public FlashPlayerName()
{
    foreach(Player, i)
    {
        switch(random(6))
        {
            case 0: SetPlayerColor(i, 0xFF0000FF);
            case 1: SetPlayerColor(i, 0xFF5005FF);
            case 2: SetPlayerColor(i, 0x4A5005FF);
            case 3: SetPlayerColor(i, 0x21007FFF);
            case 4: SetPlayerColor(i, 0x21FF7FFF);
            default: SetPlayerColor(i, 0x7C0000FF);
        }
    }
    return 1;
}
Reply
#4

Ah, you edited fast. First you type random(5) and you used 5 cases + default .
Reply
#5

Quote:
Originally Posted by MoroDan
Посмотреть сообщение
Ah, you edited fast. First you type random(5) and you used 5 cases + default .
ikr, i noticed after i posted :P
Reply
#6

Ah, thanks a lot guys
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)