Raised This Month: $ Target: $400
 0% 

Colors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-02-2013 , 11:54   Colors
Reply With Quote #1

Hello.
How can a few more colors be add in:
PHP Code:
stock Color_Print(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!t""^3"// Team Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

For example, how can I put in it some html or RGB colors?

Last edited by Kard1nal; 02-02-2013 at 11:54.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 02-02-2013 , 12:05   Re: Colors
Reply With Quote #2

Not possible.
__________________
micapat is offline
Kard1nal
Senior Member
Join Date: Dec 2012
Location: Russia
Old 02-02-2013 , 12:09   Re: Colors
Reply With Quote #3

From colored_translit plugin (say.inl)
PHP Code:
if(get_user_flags(id) & NICK_LEVEL && get_pcvar_num(g_AdminPrefix))
    {
        
mLen += format(Message[mLen], charsmax(Message) - mLen"[^x04%L^x01] "LANG_PLAYER"CT_ADMIN")
        
lgLen += format(p_LogMsg[lgLen], charsmax(p_LogMsg) - lgLen"<font color=^"green^">[%L] </font>"LANG_PLAYER"CT_ADMIN")
    }
    else 
As we can see, here is a prefix [ADMIN] which has an HTML teg FONT.
So may be it possible somehow?

Last edited by Kard1nal; 02-02-2013 at 12:11.
Kard1nal is offline
Send a message via Skype™ to Kard1nal
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 02-02-2013 , 12:15   Re: Colors
Reply With Quote #4

No, that's most likely a MOTD. You cannot use other chat colors than red, blue, green, white and yellow (default).
Backstabnoob is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode