Raised This Month: $ Target: $400
 0% 

[HELP] Admins Tags and Message Colors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-23-2015 , 18:00   [HELP] Admins Tags and Message Colors
Reply With Quote #1

Need a plugin which have 4 admins tags with different colors of messages.


ADMIN_IMMUNITY [Super Admin] : Messagecolor-white

ADMIN_BAN [Admin] : Messagecolor-green

ADMIN_MAP [Moderator] : Messagecolor-green

ADMIN_CHAT [VIP] : Messagecolor-teamcolor


There are some other tag and chat color plugins,
But those have same chat color for all admins unlike my requirement.

Thanks in anticipation!
T0FF is offline
Hartmann
Senior Member
Join Date: Nov 2014
Old 08-23-2015 , 18:53   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #2

Quote:
Originally Posted by T0FF View Post
ADMIN_BAN [Admin] : Messagecolor-green yes
ADMIN_MAP [Moderator] : Messagecolor-green yes
ADMIN_CHAT [VIP] : Messagecolor-teamcolor yes
![/I]
ADMIN_IMMUNITY [Super Admin] : Messagecolor-white No
Try, One problem I don't have white.

PHP Code:
#include <amxmodx>

new const g_szTag[][] = {
    
"",
    
"[Super Admin]",
    
"[Admin]",
    
"[Moderator]",
    
"[VIP]"
}

public 
plugin_init(){
    
register_message(get_user_msgid("SayText"),"handleSayText");
}
public 
handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[256],
        
szTmp2[256],
        
buffer[255];
        
        new 
szTag 0iFlags get_user_flags(id);
        
copy(buffer254"^x03 %s1^x01 :  %s2");

        if(
iFlags ADMIN_IMMUNITY){
            
szTag 1
            copy
(buffer254"^x03 %s1^x01 :  %s2");
        }
        else if(
iFlags ADMIN_BAN){
            
szTag 2
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_MAP){
            
szTag 3
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_CHAT){
            
szTag 4
            copy
(buffer254"^x03 %s1^x03 :  %s2");
        }
        
        new 
szPrefix[64
        
formatex(szPrefix,charsmaxszPrefix ),"^x04%s",g_szTag[szTag])    
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        
        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), buffer);
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;

__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx


Last edited by Hartmann; 08-23-2015 at 19:37.
Hartmann is offline
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-24-2015 , 10:42   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #3

Quote:
Originally Posted by Hartmann View Post
Try, One problem I don't have white.

PHP Code:
#include <amxmodx>

new const g_szTag[][] = {
    
"",
    
"[Super Admin]",
    
"[Admin]",
    
"[Moderator]",
    
"[VIP]"
}

public 
plugin_init(){
    
register_message(get_user_msgid("SayText"),"handleSayText");
}
public 
handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[256],
        
szTmp2[256],
        
buffer[255];
        
        new 
szTag 0iFlags get_user_flags(id);
        
copy(buffer254"^x03 %s1^x01 :  %s2");

        if(
iFlags ADMIN_IMMUNITY){
            
szTag 1
            copy
(buffer254"^x03 %s1^x01 :  %s2");
        }
        else if(
iFlags ADMIN_BAN){
            
szTag 2
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_MAP){
            
szTag 3
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_CHAT){
            
szTag 4
            copy
(buffer254"^x03 %s1^x03 :  %s2");
        }
        
        new 
szPrefix[64
        
formatex(szPrefix,charsmaxszPrefix ),"^x04%s",g_szTag[szTag])    
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        
        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), buffer);
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;

Great, its working.

But can the Tag Color be in White Color?
And it works fine but if an admin types as team_say then there are no message colors.
T0FF is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-24-2015 , 11:13   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #4

Quote:
Originally Posted by T0FF View Post
But can the Tag Color be in White Color?
The color white isn't possible unless you slowhack your players. However you can change yours to white in the config.cfg
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-24-2015 , 11:16   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #5

Quote:
Originally Posted by wickedd View Post
The color white isn't possible unless you slowhack your players. However you can change yours to white in the config.cfg
Okay great, so how can i change mine to white in config.cfg ?
T0FF is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-24-2015 , 11:31   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #6

Edit the line
Code:
con_color "255 180 30"
Edit: You can change your normal chat color to any color you want
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 08-24-2015 at 11:56.
wickedd is offline
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-24-2015 , 12:04   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #7

Quote:
Originally Posted by wickedd View Post
Edit the line
Code:
con_color "255 180 30"
Edit: You can change your normal chat color to any color you want
Can you fix the "team_say" in above code ?
T0FF is offline
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-26-2015 , 14:54   Re: [HELP] Admins Tags and Message Colors
Reply With Quote #8

Quote:
Originally Posted by Hartmann View Post
Try, One problem I don't have white.

PHP Code:
#include <amxmodx>

new const g_szTag[][] = {
    
"",
    
"[Super Admin]",
    
"[Admin]",
    
"[Moderator]",
    
"[VIP]"
}

public 
plugin_init(){
    
register_message(get_user_msgid("SayText"),"handleSayText");
}
public 
handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[256],
        
szTmp2[256],
        
buffer[255];
        
        new 
szTag 0iFlags get_user_flags(id);
        
copy(buffer254"^x03 %s1^x01 :  %s2");

        if(
iFlags ADMIN_IMMUNITY){
            
szTag 1
            copy
(buffer254"^x03 %s1^x01 :  %s2");
        }
        else if(
iFlags ADMIN_BAN){
            
szTag 2
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_MAP){
            
szTag 3
            copy
(buffer254"^x03 %s1^x04 :  %s2");
        }
        else if(
iFlags ADMIN_CHAT){
            
szTag 4
            copy
(buffer254"^x03 %s1^x03 :  %s2");
        }
        
        new 
szPrefix[64
        
formatex(szPrefix,charsmaxszPrefix ),"^x04%s",g_szTag[szTag])    
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        
        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), buffer);
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;

1) Kindly add the feature, if admin use say_team his chat color should be green.

2) When an admin is dead then his chat color shows as simple default (Yellow) chat.
Can you add this feature? Even if the admin is alive or dead his chat color must be green.

3) Moreover, every player/admin must be able to see all the messages if the player/admin is alive or dead or spectator.
None of a message should be missed.
T0FF is offline
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 02:25.


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