AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Color client print (https://forums.alliedmods.net/showthread.php?t=65400)

jageassyrian 01-07-2008 18:54

Color client print
 
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")
            }
        }
    } 


hlstriker 01-08-2008 00:04

Re: Color client print
 
http://forums.alliedmods.net/showthread.php?t=45753

jageassyrian 01-08-2008 16:59

Re: Color client print
 
i dont understand how to use that

hlstriker 01-08-2008 17:39

Re: Color client print
 
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")

jageassyrian 01-12-2008 23:00

Re: Color client print
 
that didnt work

hlstriker 01-13-2008 00:11

Re: Color client print
 
It works for me...

Did you get any errors?


All times are GMT -4. The time now is 10:59.

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