Raised This Month: $ Target: $400
 0% 

Color client print


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-07-2008 , 18:54   Color client print
Reply With Quote #1

how would i make the words in a code colored when they are printed on the screen for example the client chat in this code

PHP Code:
    else
    {
        new 
Float:fragsiTeam get_pcvar_num(Pcvar_Team_Only)
        for(new 
id 1id <= g_maxClientsid++)
        {
            if(
is_user_alive(id) && !g_bKilled[id])
            {
                if(
iTeam && get_user_team(id) != iTeam)
                    continue        
                
pev(idpev_fragsfrags)
                
set_pev(idpev_frags, ++frags)
                
client_print(idprint_chat"You survived the round and earned a frag")
            }
        }
    } 
jageassyrian is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-08-2008 , 00:04   Re: Color client print
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=45753
hlstriker is offline
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-08-2008 , 16:59   Re: Color client print
Reply With Quote #3

i dont understand how to use that
jageassyrian is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-08-2008 , 17:39   Re: Color client print
Reply With Quote #4

PHP Code:
new message[256];
message[0] = 0x04;
format(message[1], 251"You survived the round and earned a frag");
message[192] = '^0';
message_begin(MSG_ONEget_user_msgid("SayText"), _id);
write_byte(id);
write_string(message);
message_end(); 
Use all that to replace...
client_print(id, print_chat, "You survived the round and earned a frag")

Last edited by hlstriker; 01-13-2008 at 00:10.
hlstriker is offline
jageassyrian
Senior Member
Join Date: Jul 2007
Old 01-12-2008 , 23:00   Re: Color client print
Reply With Quote #5

that didnt work
jageassyrian is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-13-2008 , 00:11   Re: Color client print
Reply With Quote #6

It works for me...

Did you get any errors?
hlstriker 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 10:59.


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