AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Colors (https://forums.alliedmods.net/showthread.php?t=207414)

Kard1nal 02-02-2013 11:54

Colors
 
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?

micapat 02-02-2013 12:05

Re: Colors
 
Not possible.

Kard1nal 02-02-2013 12:09

Re: Colors
 
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?

Backstabnoob 02-02-2013 12:15

Re: Colors
 
No, that's most likely a MOTD. You cannot use other chat colors than red, blue, green, white and yellow (default).


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

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