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,7 +276,8 @@ public void set_level_tag(int client, int lvl, int I_rank)
CCC_SetColor(client, CCC_TagColor, StringToInt(hexadecimals, 16), false); CCC_SetColor(client, CCC_TagColor, StringToInt(hexadecimals, 16), false);
return; return;
} }
if (I_rank > 50)
{
red = (lvl * 27) % 256; red = (lvl * 27) % 256;
green = ((lvl + 50) * 23) % 256; green = ((lvl + 50) * 23) % 256;
blue = ((lvl + 100) * 29) % 256; blue = ((lvl + 100) * 29) % 256;
@ -305,4 +306,38 @@ public void set_level_tag(int client, int lvl, int I_rank)
} }
Format(tag, sizeof(tag), "\x07%s[L\x07%sV\x07%sL %s] ", hexadecimals, hexadecimals2, hexadecimals3, coloured_numbers); Format(tag, sizeof(tag), "\x07%s[L\x07%sV\x07%sL %s] ", hexadecimals, hexadecimals2, hexadecimals3, coloured_numbers);
CCC_SetTag(client, tag); 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 = (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];
char charlvl[16];
IntToString(lvl, charlvl, sizeof(charlvl));
char coloured_numbers[32];
for (int i = 0; i < strlen(charlvl); i++)
{
char number_hexa[16];
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]);
}
Format(tag, sizeof(tag), "\x07%s[L\x07%sV\x07%sL %s] ", hexadecimals, hexadecimals2, hexadecimals3, coloured_numbers);
CCC_SetTag(client, tag);
} }