ColouredText not work !
#1

That what I did -

PHP код:
    new text2[256], Length strlen(string);
     if(
Length 135)
     {
     if(
Length 270) return scm(playeridred"!too long"), 0;
          new 
string21024 ];
          new 
string31024 ];
          
//
          
strmid(text2string0Length 2);
          
format(string2sizeof(string2), "%s"text2);
          
scmToAll(0xFFFFFFAA,ColouredText(string2));
          
          
strmid(text2stringLength 2Length);
          
format(string3sizeof(string3), "%s"text2);
          
scmToAll(0xFFFFFFAA,ColouredText(string3));
     }
     else
     
scmToAll(redColouredText(string)); 
This is the function that I seen here -


PHP код:
stock ColouredText(text[])
{
    
enum
        colorEnum
        
{
            
colorName[16],
            
colorID[7]
        }
    ;
    new
        
colorInfo[][colorEnum] =
        {
            { 
"BLUE",           "1B1BE0" },
            { 
"PINK",           "E81CC9" },
            { 
"YELLOW",         "DBED15" },
            { 
"LIGHTGREEN",     "8CED15" },
            { 
"LIGHTBLUE",      "15D4ED" },
            { 
"RED",            "FF0000" },
            { 
"GREY",           "BABABA" },
            { 
"WHITE",          "FFFFFF" },
            { 
"ORANGE",         "DB881A" },
            { 
"GREEN",          "37DB45" },
            { 
"PURPLE",         "7340DB" }
        },
        
string[(128 32)],
        
tempString[16],
        
pos = -1,
        
x
    
;
    
strmid(stringtext0128sizeof(string));
    for( ; 
!= sizeof(colorInfo); ++x)
    {
        
format(tempStringsizeof(tempString), "#%s"colorInfo[x][colorName]);
        while((
pos strfind(stringtempStringtrue, (pos 1))) != -1)
        {
            new
                
tempLen strlen(tempString),
                
tempVar,
                
pos
            
;
            
format(tempStringsizeof(tempString), "{%s}"colorInfo[x][colorID]);
            if(
tempLen 8)
            {
                for(new 
j!= (tempLen); ++j)
                {
                    
strins(string" "pos);
                }
            }
            for( ; ((
string[i] != 0) && (tempVar != 8)) ; ++i, ++tempVar)
            {
                
string[i] = tempString[tempVar];
            }
            if(
tempLen 8)
            {
                
strdel(stringi, (+ (tempLen 8)));
            }
            
= -1;
        }
    }
    return 
string;

The problem - I doing "(red) check" and the message sending regulary, without the red color, why ?

THANKS !
Reply


Messages In This Thread
ColouredText not work ! - by tal_peretz - 28.06.2011, 00:12
Re: ColouredText not work ! - by =WoR=Varth - 28.06.2011, 00:25
Re: ColouredText not work ! - by tal_peretz - 28.06.2011, 09:31
Re: ColouredText not work ! - by CrazyBlob - 28.06.2011, 10:49
Re: ColouredText not work ! - by tal_peretz - 28.06.2011, 11:15
Re: ColouredText not work ! - by tal_peretz - 28.06.2011, 12:19
Re: ColouredText not work ! - by tal_peretz - 28.06.2011, 20:28
Re: ColouredText not work ! - by tal_peretz - 29.06.2011, 11:14
Re: ColouredText not work ! - by tal_peretz - 29.06.2011, 12:04

Forum Jump:


Users browsing this thread: 3 Guest(s)