SA-MP Forums Archive
Rainbow chat - 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)
+--- Thread: Rainbow chat (/showthread.php?tid=261610)



Rainbow chat - [REBOK] - 14.06.2011

How to make a rainbow chat?




Re: Rainbow chat - Lorenc_ - 14.06.2011

How would it look like?

Like if you chat your text color is different?


Re: Rainbow chat - [REBOK] - 14.06.2011

Lorenc_




Re: Rainbow chat - OKStyle - 11.09.2011

pawn Код:
stock SendRainbowMessage(playerid, const text[]) // RyDeR`
{
new
color_Red,
color_Green,
color_Blue,
string[256]
;
for(new i = strlen(text), j = i; i > 0; --i)
{
color_Red = floatround((0xFF * floatsin((i / (j / 3.0)), radian)));
color_Green = floatround((0xFF / j) * i);
color_Blue = floatround((0xFF / j) * (j - i));

format(string, sizeof(string), "%s{%06x}%c", string, color_Red << 16 | color_Green << 8 | color_Blue, text[j - i]);

if(strlen(string) > 128)
{
SendClientMessage(playerid, -1, string);
string = "";
}
}
return SendClientMessage(playerid, -1, string);
}



Re: Rainbow chat - RyDeR` - 11.09.2011

Indeed, here:
http://forum.sa-mp.com/showthread.ph...74#post1112874


Re: Rainbow chat - Mean - 11.09.2011

Quote:
Originally Posted by OKStyle
string[256]
*sigh*.... Change that to 128, 150 if you use color embedding.


Re: Rainbow chat - [ADM]Madon - 03.10.2013

Quote:
Originally Posted by OKStyle
Посмотреть сообщение
pawn Код:
stock SendRainbowMessage(playerid, const text[]) // RyDeR`
{
new
color_Red,
color_Green,
color_Blue,
string[256]
;
for(new i = strlen(text), j = i; i > 0; --i)
{
color_Red = floatround((0xFF * floatsin((i / (j / 3.0)), radian)));
color_Green = floatround((0xFF / j) * i);
color_Blue = floatround((0xFF / j) * (j - i));

format(string, sizeof(string), "%s{%06x}%c", string, color_Red << 16 | color_Green << 8 | color_Blue, text[j - i]);

if(strlen(string) > 128)
{
SendClientMessage(playerid, -1, string);
string = "";
}
}
return SendClientMessage(playerid, -1, string);
}

and this ?>





Re: Rainbow chat - Konstantinos - 03.10.2013

Quote:
Originally Posted by [ADM]Madon
Посмотреть сообщение
and this ?>


You know you could create your own thread for asking what you want instead of bumping someone's an old thread.

They are textdraws and sprites.