Issue
#7

It is possible, there you go made by Y less

put this above OnPlayerText
pawn Код:
ReColor(text[])
{
    new
        pos = -1;
    while ((pos = strfind(text, "(", false, pos + 1)) != -1)
    {
        new
            c = pos + 1,
            n = 0,
            ch;
        // Note that the order of these is important!
        while ((ch = text[c]) && n != 6)
        {
            if (!('a' <= ch <= 'f' || 'A' <= ch <= 'F' || '0' <= ch <= '9'))
            {
                break;
            }
            ++c;
            ++n;
        }
        if (n == 6 && ch == ')')
        {
            text[pos] = '{';
            text[c] = '}';
        }
    }
}
and this at the begenning of OnPlayerText:
pawn Код:
ReColor(text);
although now, you use (FF0000) instead of {FF0000}[/QUOTE]
Reply


Messages In This Thread
Issue - by Eugene. - 16.10.2013, 10:23
Re: Issue - by DanishHaq - 16.10.2013, 10:24
Re: Issue - by Eugene. - 16.10.2013, 10:35
Re: Issue - by DanishHaq - 16.10.2013, 10:55
Re: Issue - by iJumbo - 16.10.2013, 10:57
Re: Issue - by Eugene. - 16.10.2013, 13:22
Re: Issue - by JamesH - 16.10.2013, 13:58

Forum Jump:


Users browsing this thread: 3 Guest(s)