07.07.2013, 18:06
I've done this:
And it works like this:
Hi *-Smiling-*
But when I try to use more *- -* the 2nd, 3rd etc.. doesn't change color like this:
Hi *-Smiling-* How are you? *-Smiling again-*
Can anyone help ?
Код:
if(strfind(text, "*-", true) != -1)
{
format(stringx, sizeof(stringx), "%s", str_replace("*-", "{C2A2DA}*-", text));
if(strfind(stringx, "-*", true) != -1)
{
format(stringy, sizeof(stringy), "%s", str_replace("-*", "-*{C8C8C8}", stringx));
}
else
{
format(stringy, sizeof(stringy), "%s", stringx);
}
}
else
{
format(stringy, sizeof(stringy), "%s", text);
}
format(string, sizeof(string), "Sconosciuto dice: %s", stringy);
Hi *-Smiling-*
But when I try to use more *- -* the 2nd, 3rd etc.. doesn't change color like this:
Hi *-Smiling-* How are you? *-Smiling again-*
Can anyone help ?

