10.03.2011, 17:32
(
Последний раз редактировалось OKStyle; 20.02.2017 в 09:11.
)
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:
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;
}