Raised This Month: $ Target: $400
 0% 

[SOLVED] use ColorChat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 10-11-2015 , 11:56   [SOLVED] use ColorChat
Reply With Quote #1

hi guys how to use ColorChat here

PHP Code:
public cmdSayAdmin(id)
{
    
    new 
said[2]
    
read_argv(1said1)
    if (
said[0] != '@')
        return 
PLUGIN_CONTINUE
    
new message[192], name[32], authid[32]
    new 
players[32], inum
    read_args
(message191)
    
remove_quotes(message)
    
get_user_authid(idauthid31)
    
get_user_name(idname31)
    if(
get_user_flags(id) & ADMIN_CHAT)
        
format(message191"[* ADMINS *] %s:  %s"namemessage[1])
    else
        
format(message191"[* PLAYER *] %s:  %s"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
    

here
PHP Code:
 if(get_user_flags(id) & ADMIN_CHAT)
        
format(message191"[* ADMINS *] %s:  %s"namemessage[1])
    else
        
format(message191"[* PLAYER *] %s:  %s"namemessage[1]) 
i wrote
PHP Code:
    if(get_user_flags(id) & ADMIN_CHAT)
        
ColorChat(messageGREY191"^4[* ADMINS *] %s:  %s"namemessage[1])
    else
        
ColorChat(messageGREY191"^4[* PLAYER *] %s:  %s"namemessage[1]) 
Example:
[* ADMINS *] arvEL.-: Hi all

[* *] = Yellow color
ADMINS = Green color
arvEL.- = Grey color
Hi all = Yellow color

^1[*^4 ADMINS ^1*]^3 %s^1: %s

i hope you understand my meaning
but i have problem with compile :/
help me plz

Last edited by arvEL.; 10-28-2015 at 23:26.
arvEL. is offline
Send a message via Skype™ to arvEL.
 



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:17.


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