Raised This Month: $ Target: $400
 0% 

Modified Admin Color Chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Patricius
Junior Member
Join Date: Dec 2008
Old 06-14-2009 , 14:12   Re: Modified Admin Color Chat
Reply With Quote #7

Hi all,

I do not want to create a new topic, so I write here. Trying to change adminchat.sma When I used the command in the admin chat (say_team @), the message is not a color. Is it possible to change the color of the admin chat this way?. I do not want to use the plugin: admin chat color .... Here is original adminchat.sma with my simple edit:

PHP Code:
static const COLOR[] = "^x04" //green


public cmdSayAdmin(id)
{

    new 
said[2]
    
read_argv(1said1)
    
    if (
said[0] != '@')
        return 
PLUGIN_CONTINUE
    
    
new message[192], name[32], authid[32], userid
    
new players[32], inum
    
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    
userid get_user_userid(id)
    
    
log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^""nameuseridauthidmessage[1])
    
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")"nameuseridauthidmessage[1])
    
    if (
is_user_admin(id))
        
format(message191"(%L) %s: %s %s"id"ADMIN"nameCOLORmessage[1])
    else
        
format(message191"(%L) %s : %s"id"PLAYER"namemessage[1])

    
get_players(playersinum)
    
    for (new 
0inum; ++i)
    {
        
// dont print the message to the client that used the cmd if he has ADMIN_CHAT to avoid double printing
        
if (players[i] != id && get_user_flags(players[i]) & g_AdminChatFlag)
            
client_print(players[i], print_chat"%s"message)
    }
    
    
client_print(idprint_chat"%s"message)
    
    return 
PLUGIN_HANDLED

Thanks

Sorry for my bad English
Patricius 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 13:55.


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