Raised This Month: $ Target: $400
 0% 

Terrorists are blue in chat, and CTs are red


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hartmann
Senior Member
Join Date: Nov 2014
Old 10-05-2015 , 15:48   Re: Terrorists are blue in chat, and CTs are red
Reply With Quote #6

whether this code in the original plugin or your insert:

PHP Code:
public Say(id)
{
    new 
Chat[256], Name[32], cChat[256];
    
read_args(Chat255);
    
remove_quotes(Chat);
    
get_user_name(idName31);
    
    if(
strlen(Chat) > 1)
    {
        
formatex(cChat255"^4[%s] ^3%s^1: %s"Rangs[Rang[id]], NameChat);
    }
    
    
ColorChat(0TEAM_COLORcChat);
    return 
PLUGIN_HANDLED;

because uses #include <colorchat> and stock print_color(const id, const input[], any:...) and kinda me confusing that.

Try on this way:

in plugin_init
PHP Code:
register_message(get_user_msgid("SayText"),"handleSayText"); 
instead Say
PHP Code:
public handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[256],
        
szTmp2[256];
        
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        new 
szPrefix[64
        
formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]",Rangs[Rang[id]])
        
        if(!
equal(szTmp"#Cstrike_Chat_All")){
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), " ");
            
add(szTmp2charsmax(szTmp2), szTmp);
        }
        else{
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), "^x03 %s1^x01 :  %s2");
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;

__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann is offline
 



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 22:16.


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