Anty TextDraw crashing in /news
#7

I edited my post above.

Something like this ( untested ) might work.
pawn Код:
stock FormatColors( string[] )
{
    new
        pos,
        sub[164]
    ;
    format( sub , sizeof(sub) , "%s" , string );
    pos = strfind( sub , "[g]" , true );
    while( pos != -1 )
    {
        strdel( sub , pos , pos + 3 , sizeof(sub) );
        strins( sub , "~g~" , pos );
        pos = strfind( sub , "[g]" , true );
    }
    pos = strfind( sub , "[r]" , true );
    while( pos != -1 )
    {
        strdel( sub , pos , pos + 3 , sizeof(sub) );
        strins( sub , "~r~" , pos );
        pos = strfind( sub , "[r]" , true );
    }      
    return sub;
}
Obviously you would have to add all the symbols yo wanted to allow.
Reply


Messages In This Thread
Anty TextDraw crashing in /news - by Dodus - 25.09.2011, 10:27
Re: Anty TextDraw crashing in /news - by iJumbo - 25.09.2011, 10:30
Re: Anty TextDraw crashing in /news - by Dodus - 25.09.2011, 10:38
Re: Anty TextDraw crashing in /news - by iJumbo - 25.09.2011, 10:43
Re: Anty TextDraw crashing in /news - by Rachael - 25.09.2011, 10:47
Re: Anty TextDraw crashing in /news - by [MWR]Blood - 25.09.2011, 10:49
Re: Anty TextDraw crashing in /news - by Rachael - 25.09.2011, 11:04
Re: Anty TextDraw crashing in /news - by Dodus - 25.09.2011, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)