Raised This Month: $51 Target: $400
 12% 

Show teammate's money with color in chat?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FPcokE
Member
Join Date: Aug 2011
Old 10-28-2011 , 06:53   Show teammate's money with color in chat?
Reply With Quote #1

Hey, ive got a "show teammate's money" script working with client_print but i was wondering how to add some color in it too.

The script:
PHP Code:
public show_money(client)
{
    static 
name[32];

    new 
moneyid;
    
    for (
id 1id <= g_max_playersid++)
    {
        if (
is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {
            
money cs_get_user_money(id);
            
get_user_name(idname31);
            
client_print(clientprint_chat"(Penge) %-22.22s: %d^n"namemoney);
        }
    }

Ive searched a bit and i found this:
PHP Code:
    message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, id)
    
write_byte(id)
    
write_string("^x03Team colored text ^x01Normal color")
    
message_end() 
Thats just not exactly what i need (i think) because its not something the player have said in say or say_team.
I want to use team color in the name only, I hope u can help me with this. And is it even possible?

Last edited by FPcokE; 10-28-2011 at 07:57.
FPcokE is offline
FPcokE
Member
Join Date: Aug 2011
Old 10-28-2011 , 09:05   Re: Show teammate's money with color in chat?
Reply With Quote #2

No one?
FPcokE is offline
keyblade
Member
Join Date: Nov 2010
Location: China
Old 10-28-2011 , 09:41   Re: Show teammate's money with color in chat?
Reply With Quote #3

colorchat native and stock
http://forums.alliedmods.net/showthr...ight=colorchat

colorchat guide
http://forums.alliedmods.net/showthr...ight=colorchat

next time you should search before post
keyblade is offline
FPcokE
Member
Join Date: Aug 2011
Old 10-28-2011 , 10:04   Re: Show teammate's money with color in chat?
Reply With Quote #4

PHP Code:
            format(msg127"^x01(Penge) ^x03%s^x01: %d^n"namemoney);
            
message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, id);
            
write_byte(id);
            
write_string(msg);
            
message_end(); 
thats it, found out my self. thanks anyway..
FPcokE is offline
FPcokE
Member
Join Date: Aug 2011
Old 10-28-2011 , 10:40   Re: Show teammate's money with color in chat?
Reply With Quote #5

PHP Code:
public show_money(client)
{
    static 
name[32];
    static 
msg[128];

    new 
moneyid;
    
    for (
id 1id <= g_max_playersid++)
    {
        if (
is_user_connected(id) && cs_get_user_team(id) == cs_get_user_team(client))
        {            
            
money cs_get_user_money(id);
            
get_user_name(idname31);
            
format(msg127"^x01(Penge) ^x03%s^x01: %d^n"namemoney);

            
message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, id);
            
write_byte(id);
            
write_string(msg);
            
message_end();
        }
    }

Ive got a problem, it only show me X as many players there is in the team instead of showing there name and money :S

PHP Code:
(Penge) [fp]zhe legendary nEwb800
(Penge) [fp]zhe legendary nEwb800 
FPcokE is offline
kblo
Junior Member
Join Date: Nov 2012
Old 11-26-2012 , 22:59   Re: Show teammate's money with color in chat?
Reply With Quote #6

well, i was almost happy.

it's really broken.
kblo is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-27-2012 , 01:07   Re: Show teammate's money with color in chat?
Reply With Quote #7

@kblo
Why did you revive this thread? Your post is totally useless.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 11:03.


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