Raised This Month: $ Target: $400
 0% 

[SOLVED]Again a Colorchat Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-04-2010 , 12:30   Re: Again a Colorchat Problem
Reply With Quote #1

Quote:
Originally Posted by One View Post
nope...

check the attached pic. how you can see i'm T & my nickname is BLUE
& your code is like mine. its the same just you check if is user alive before checking frags...its for sure better but this cant solve the print problem



i think i have to get users team by print. something like :

if(cs_get_user_team(id) == cs_team_ct)
{
colorchat(0,BLUE,.............
}
else if(cs_get_user_team(id) == cs_team_t)
{
colorchat(0,RED,.........


i hope anyone has a better idea or colorchat native

PHP Code:
public startround()
{
    new 
name[32], users_fragsusers_deathsgerechnet 
    
    
for(new id id <= g_maxPlayers id++) 
    {
        if(
is_user_connected(id))
        {
            
users_frags get_user_frags(id)
            
users_deaths get_user_deaths(id
            
gerechnet users_frags users_deaths
            
            
if(gerechnet >= 10)
            {
                
get_user_name(idname31)
                
                
ColorChat(id,RED,"\YELDu hast \GRN+%d Frags \YELund musst jetzt mit \GRNFunWaffen \YELSpielen!Schreibe \GRN/fungun \YELfuer mehr Info.",gerechnet)
                
//ColorChat(0,NORMAL,"\TEM%s \YELhat +%d Frags \YELund muss jetzt mit \GRNFunWaffen \YELSpielen!",name,gerechnet)
                
if(cs_get_user_team(id) == CS_TEAM_CT)
                {
                    
ColorChat(0,NORMAL,"\TEM%s \YELhat +%d Frags \YELund muss jetzt mit \GRNFunWaffen \YELSpielen!",name,gerechnet)
                }
                else if(
cs_get_user_team(id) == CS_TEAM_T)
                {
                    
ColorChat(0,RED,"\TEM%s \YELhat +%d Frags \YELund muss jetzt mit \GRNFunWaffen \YELSpielen!",name,gerechnet)
                }
                
user_is_warned[id] = true
            
}
        }
        else
        {
            
user_is_warned[id] = false
        
}
    }

I think color chat uses get_user_team to retrieve user's team and then mess it for the color message and according to Conner, get_user_team can return some false results some times so it would be better to replace that part in the include file with cs_get_user_team or it would be much better to use some other color chat function to achieve what u want
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 12-04-2010 , 13:22   Re: Again a Colorchat Problem
Reply With Quote #2

why don't you use simply colorchat.inc
__________________
vato loco [GE-S] is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-04-2010 , 13:36   Re: Again a Colorchat Problem
Reply With Quote #3

Quote:
Originally Posted by vato loco [GE-S] View Post
why don't you use simply colorchat.inc
It is the same thing ..
colorchat.inc also uses get_user_team which is buggy !
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
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:17.


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