[FilterScript] Rainbow Tab
#1

It's very simple script which puts players connecting color in a way that turns the rainbow. The new version of the script remove spaces between colors, ie each player's color output permuted again.

Download:
http://solidfiles.com/d/5e9e/

or:

pawn Код:
#include <a_samp>
// Rainbow Tab by REALman, OKStyle
new RainbowError;
new RainbowGradient[25] = {
0xFF0000FF, 0xFF2C00FF, 0xFF5000FF, 0xFF8700FF, 0xFFA700FF,
0xFFDC00FF, 0xFFFB00FF, 0xC4FF00FF, 0x7BFF00FF, 0x00FF00FF,
0x00FF1EFF, 0x00FF3BFF, 0x00FF7CFF, 0x00FFAEFF, 0x00FFD5FF,
0x00FFFFFF, 0x00CCFFFF, 0x00ACFFFF, 0x0083FFFF, 0x0054FFFF,
0x0000FFFF, 0x2C00FFFF, 0x5F00FFFF, 0x9B00FFFF, 0xCB00FFFF
};
public OnPlayerConnect(playerid)
{
    for(new i = GetMaxPlayers() - 1; i >= 0; --i)
    {
        if(i == sizeof(RainbowGradient)) RainbowError = 0;
        if(IsPlayerConnected(i))
        {
            SetPlayerColor(i, RainbowGradient[i + RainbowError]);
        }
        else RainbowError -= 1;
    }
    return 1;
}
public OnPlayerDisconnect(playerid)
{
    for(new i = GetMaxPlayers() - 1; i >= 0; --i)
    {
        if(i == sizeof(RainbowGradient)) RainbowError = 0;
        if(IsPlayerConnected(i))
        {
            SetPlayerColor(i, RainbowGradient[i - RainbowError]);
        }
        else RainbowError += 1;
    }
    return 1;
}
Reply
#2

Wow.. I love it! Could ya add pastebin, because solidfiles halts my laptop and I not like that.
Reply
#3

I think i can add code right here. Added source from 1.2 in 1st post.
Reply
#4

nice Idea and shortest way
I verry like it
Reply
#5

Loool it's awesome
Reply
#6

Awesome dude
Reply
#7

Can't these colors be made simpler , with a loop?
Reply
#8

these are hex colors
and if you increase the hex colors by a loop there
wont be a Rainbow
or do you want a count like
Rainbow[playerid] += 7D ?xD
Reply
#9

Oh I just realised, you should actually put it in the order a rainbow goes , Then it'll have the flow of it
Reply
#10

Awesome, keep it up.
Reply
#11

oh nice
Reply
#12

nice
Reply
#13

What i need to write to filterscripts line ?
Can anybody help me ?
Sorry for my english....
Reply
#14

Lol it's nice !
BUT you can't see the colors of the players then ...
Reply
#15

I've created this

https://sampforum.blast.hk/showthread.php?pid=1112874#pid1112874

I tested with SendClientMessage and it worked quite good. If anyone has some time to test and give some feedback, go ahead. I'll post it in Useful Snippets anyway.

It's working with as much players as you want.
Reply
#16

Now thats nice
Reply
#17

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
I've created this
This is a better way, I thought the introduction of features get the color last night, but so far focused on the array with them. You got me beat.
Reply
#18

Amazing Dude, Really COOL
Reply
#19

Only 25?
Reply
#20

In my script - looping every 25, in Ryder's - don't know.
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)