Raised This Month: $51 Target: $400
 12% 

Admin Tags


Post New Thread Reply   
 
Thread Tools Display Modes
JuBa
BANNED
Join Date: Aug 2012
Location: Algeria
Old 08-12-2013 , 07:09   Re: Admin Tags
Reply With Quote #11

Deagle ( Amine ) That's what im searching D
JuBa is offline
Send a message via MSN to JuBa Send a message via Yahoo to JuBa Send a message via Skype™ to JuBa
akash_guptacosmos
Senior Member
Join Date: May 2013
Location: India,Kolkata
Old 08-19-2013 , 09:15   Re: Admin Tags
Reply With Quote #12

see this plesae plugin compiling perfectly but not working :X
Attached Files
File Type: sma Get Plugin or Get Source (admins_tag.sma - 269 views - 2.3 KB)
akash_guptacosmos is offline
Cheezpuff
BANNED
Join Date: Oct 2012
Location: City of the Dead
Old 08-19-2013 , 13:50   Re: Admin Tags
Reply With Quote #13

not tested, change the access urself
PHP Code:
    #include < amxmodx >
    #include < cstrike >
    #include < ColorChat >
     
    #define ADMIN_LISTEN            ADMIN_RCON
     
    
enum _:enAdminsData
    
{
            
Flag,
            
Name32 ]
    };
     
    new 
szAdmins[ ][ enAdminsData ] =
    {
            { 
ADMIN_RCON,           "Head Admin" },
            { 
ADMIN_IMMUNITY,       "General Admin" },
            { 
ADMIN_BAN,            "Super Admin" },
            { 
ADMIN_KICK,           "Normal Admin" },
            { 
ADMIN_SLAY,           "Helper Admin" }
    };
     
    new 
Cvars];
     
    public 
plugin_init()
    {
            
register_plugin"Admins Tags""1.0.0""AMXX" );
           
            
register_clcmd"say""CmdSay" );
           
            
register_clcmd"say_team""CmdSayTeam" );
           
            
Cvars] = register_cvar"at_enabled""1" );                        // Enable or Disable the plugin
            
Cvars] = register_cvar"at_admin_listen""1" );           // Admins can see say teams.( if "at_all_chat" is set to 0 then they will be able to see dead and alive as well )
            
Cvars] = register_cvar"at_all_chat""1" );               // Alive players can see Dead players messages.
    
}
     
    public 
CmdSayclient )
    {
            if ( !( 
get_user_flagsclient ) & ADMIN_SLAY ) )
                    return 
0;
           
            new 
szMsg512 ];
           
            
read_argsszMsgcharsmaxszMsg ) );
           
            
remove_quotesszMsg );
           
            if ( 
szMsg] == '!' || szMsg] == '@' || szMsg] == '/' || equaliszMsg"" ) || equaliszMsg" " ) || equaliszMsg"   " ) )
                    return 
0;
           
            new 
iAdmin;
           
            for ( new 
isizeof szAdminsi++ )
            {
                    if ( 
get_user_flagsclient ) & szAdmins][ Flag ] )
                    {
                            
iAdmin i;
                           
                            break;
                    }
            }
           
            
PrintMessageclientfalseszAdminsiAdmin ][ Name ], GetUserNameclient ), szMsg );
           
            return 
1;
    }
     
    public 
CmdSayTeamclient )
    {
            if ( !( 
get_user_flagsclient ) & ADMIN_SLAY ) )
                    return 
0;
           
            new 
szMsg512 ];
           
            
read_argsszMsgcharsmaxszMsg ) );
           
            
remove_quotesszMsg );
           
            if ( 
szMsg] == '!' || szMsg] == '@' || szMsg] == '/' || equaliszMsg"" ) || equaliszMsg" " ) || equaliszMsg"   " ) )
                    return 
0;
           
            new 
iAdmin;
           
            for ( new 
isizeof szAdminsi++ )
            {
                    if ( 
get_user_flagsclient ) & szAdmins][ Flag ] )
                    {
                            
iAdmin i;
                           
                            break;
                    }
            }
           
            
PrintMessageclienttrueszAdminsiAdmin ][ Name ], GetUserNameclient ), szMsg );
           
            return 
1;
    }
     
    
/* Stocks */
     
    
stock GetUserName( const index )
    {
            static 
g_szName32 ];
           
            
get_user_nameindexg_szNamecharsmaxg_szName ) );
           
            return 
g_szName;
    }
     
    
stock GetTeamColor( const index )
    {
            switch ( 
cs_get_user_teamindex ) )
            {
                    case 
CS_TEAM_CT:        return BLUE;
                   
                    case 
CS_TEAM_SPECTATOR: return GREY;
                   
                    case 
CS_TEAM_T:         return RED;
            }
           
            return 
1;
    }
     
    
stock GetTeamName( const index )
    {
            new 
szTeam18 ];
           
            switch ( 
cs_get_user_teamindex ) )
            {
                    case 
CS_TEAM_CT:        szTeam "Counter-Terrorist";
                   
                    case 
CS_TEAM_SPECTATORszTeam "SPEC";
                   
                    case 
CS_TEAM_T:         szTeam "Terrorist";
            }
           
            return 
szTeam;
    }
     
    
stock PrintMessage( const indexboolbTeamszTag[], szName[], szMsg[] )
    {
            static 
g_iMaxPlayersszTeam22 ];
           
            
g_iMaxPlayers get_maxplayers();
           
            if ( 
bTeam )
                    
formatexszTeamcharsmaxszTeam ), " (%s)"GetTeamNameindex ) );
           
            for ( new 
1g_iMaxPlayersi++ )
            {
                    if ( !
is_user_connected) )
                            continue;
                   
                    if ( 
bTeam && get_pcvar_numCvars] ) == && cs_get_user_teamindex ) != cs_get_user_team) && !( get_user_flags) & ADMIN_LISTEN ) )
                            continue;
                   
                    if ( 
get_pcvar_numCvars] ) == )
                    {
                            if ( 
get_pcvar_numCvars] ) == && !( get_user_flags) & ADMIN_LISTEN ) )
                            {
                                    if ( 
is_user_aliveindex ) && !is_user_alive) || !is_user_aliveindex ) && is_user_alive) )
                                            continue;
                            }
                    }
                   
                    
ColorChatiGetTeamColorindex ), "^1%s%s^4[%s]^3 %s :^4 %s"is_user_aliveindex ) ? "" "*DEAD*"bTeam szTeam ""szTagszNameszMsg );
            }
    } 

Last edited by Cheezpuff; 08-19-2013 at 13:52.
Cheezpuff is offline
Send a message via Skype™ to Cheezpuff
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 04:49.


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