SA-MP Forums Archive
How to make a player's colour flash? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make a player's colour flash? (/showthread.php?tid=272982)



How to make a player's colour flash? - grand.Theft.Otto - 30.07.2011

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


Re: How to make a player's colour flash? - vyper - 30.07.2011

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


Re: How to make a player's colour flash? - Laronic - 30.07.2011

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;
}



Re: How to make a player's colour flash? - MoroDan - 30.07.2011

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


Re: How to make a player's colour flash? - Laronic - 30.07.2011

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


Re: How to make a player's colour flash? - grand.Theft.Otto - 30.07.2011

Ah, thanks a lot guys