added randomized multi colour for top 50

This commit is contained in:
jenz 2024-04-27 02:49:59 +02:00
parent 10ef6b63b0
commit 0f0d634a8d

View File

@ -276,15 +276,52 @@ public void set_level_tag(int client, int lvl, int I_rank)
CCC_SetColor(client, CCC_TagColor, StringToInt(hexadecimals, 16), false);
return;
}
if (I_rank > 50)
{
red = (lvl * 27) % 256;
green = ((lvl + 50) * 23) % 256;
blue = ((lvl + 100) * 29) % 256;
Format(hexadecimals2, sizeof(hexadecimals2), "%02X%02X%02X", red, green, blue);
red = (lvl * 27) % 256;
green = ((lvl + 50) * 23) % 256;
blue = ((lvl + 100) * 29) % 256;
red = (lvl * 37) % 256;
green = ((lvl + 50) * 33) % 256;
blue = ((lvl + 100) * 39) % 256;
Format(hexadecimals3, sizeof(hexadecimals3), "%02X%02X%02X", red, green, blue);
char tag[128];
char charlvl[16];
IntToString(lvl, charlvl, sizeof(charlvl));
char coloured_numbers[32];
for (int i = 0; i < strlen(charlvl); i++)
{
int i2 = i + 2;
i2 = i * i;
char number_hexa[16];
red = (lvl * (i2 * 37)) % 256;
green = ((lvl + (i2 * 50)) * 33) % 256;
blue = ((lvl + (i2 * 100)) * 39) % 256;
Format(number_hexa, sizeof(number_hexa), "%02X%02X%02X", red, green, blue);
Format(coloured_numbers, sizeof(coloured_numbers), "%s\x07%s%c", coloured_numbers, number_hexa, charlvl[i]);
}
Format(tag, sizeof(tag), "\x07%s[L\x07%sV\x07%sL %s] ", hexadecimals, hexadecimals2, hexadecimals3, coloured_numbers);
CCC_SetTag(client, tag);
return;
}
red = (GetRandomInt(0, 255)) % 256;
green = (GetRandomInt(0, 255)) % 256;
blue = (GetRandomInt(0, 255)) % 256;
Format(hexadecimals, sizeof(hexadecimals), "%02X%02X%02X", red, green, blue);
red = (GetRandomInt(0, 255)) % 256;
green = (GetRandomInt(0, 255)) % 256;
blue = (GetRandomInt(0, 255)) % 256;
Format(hexadecimals2, sizeof(hexadecimals2), "%02X%02X%02X", red, green, blue);
red = (lvl * 37) % 256;
green = ((lvl + 50) * 33) % 256;
blue = ((lvl + 100) * 39) % 256;
red = (GetRandomInt(0, 255)) % 256;
green = (GetRandomInt(0, 255)) % 256;
blue = (GetRandomInt(0, 255)) % 256;
Format(hexadecimals3, sizeof(hexadecimals3), "%02X%02X%02X", red, green, blue);
char tag[128];
@ -294,12 +331,10 @@ public void set_level_tag(int client, int lvl, int I_rank)
char coloured_numbers[32];
for (int i = 0; i < strlen(charlvl); i++)
{
int i2 = i + 2;
i2 = i * i;
char number_hexa[16];
red = (lvl * (i2 * 37)) % 256;
green = ((lvl + (i2 * 50)) * 33) % 256;
blue = ((lvl + (i2 * 100)) * 39) % 256;
red = (GetRandomInt(0, 255)) % 256;
green = (GetRandomInt(0, 255)) % 256;
blue = (GetRandomInt(0, 255)) % 256;
Format(number_hexa, sizeof(number_hexa), "%02X%02X%02X", red, green, blue);
Format(coloured_numbers, sizeof(coloured_numbers), "%s\x07%s%c", coloured_numbers, number_hexa, charlvl[i]);
}