Raised This Month: $ Target: $400
 0% 

Chat Prefixes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-14-2010 , 07:10   Re: Chat Prefixes
Reply With Quote #2

in init
PHP Code:
    gmsgSayText=get_user_msgid("SayText")//chattag
    
register_message(gmsgSayText,"messageSayText");//chattag
    
gcvarTag register_cvar("amx_chattag","*VIP*");//chattag
    
gcvarLock register_cvar("amx_chattag_lock","1");//chattag 
then
PHP Code:
public messageSayText(msg_idmsg_destmsg_entity){
new 
id get_msg_arg_int(1
if(
is_user_connected(id)){

new 
szBuffer[128];
get_msg_arg_string(2szBuffer127);

if(
contain(szBuffer"#Cstrike_Chat_")==0){
    
    new 
szName[50], szTag[18];
    
get_user_name(idszName31);
    
get_pcvar_string(gcvarTagszTag17);
    
    if(
get_user_flags(id) & TAG_ACCESS){
        
format(szName49,"%s %s"szTagszName);
        }else{
        if(
containi(szNameszTag)==&& get_pcvar_num(gcvarLock)){
            if(
id==msg_entity)
                
ColorChat(idRED,"Usun z nicku tag^x03 %s^x01, aby korzystac z chatu",szTag);
            return 
PLUGIN_HANDLED;
        }
    }
    
    new 
szBuffer2[192];
    
get_msg_arg_string(4szBuffer2191);
    
    
message_begin(MSG_ONEgmsgSayText,{0,0,0}, msg_entity);
    
write_byte(id);
    
write_string(szBuffer);
    
write_string(szName);
    
write_string(szBuffer2);
    
message_end();
    return 
PLUGIN_HANDLED;
}
}
return 
PLUGIN_CONTINUE;

__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven 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 21:55.


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