Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- enum _:Admins
- {
- Owner,
- Manager,
- SuperAdmin,
- Admin,
- VIP
- }
- enum _:AdminLevel
- {
- Name[12],
- Flag
- }
- new const szAdmins[ Admins ][ AdminLevel ] = {
- { "Owner", ADMIN_IMMUNITY },
- { "Manager", ADMIN_RESERVATION },
- { "Super Admin", ADMIN_LEVEL_H },
- { "Admin", ADMIN_BAN },
- { "VIP", ADMIN_KICK }
- }
- public plugin_init() {
- register_plugin( "Admins Check", "v0.0.1", "+ColdWar" )
- register_saycmd( "admin", "CmdAdmins" );
- register_saycmd( "admins", "CmdAdmins" );
- }
- public CmdAdmins( client )
- {
- new bool: g_bAdded[33], szString[ 200 ], g_iCounter, szName[ 32 ];
- for ( new i = 0 ; i < Admins ; i ++ )
- {
- g_iCounter = 0
- szString = ""
- for( new j = 1; j <= get_maxplayers () ; j ++ )
- {
- if( ! is_user_connected( j ) )
- continue ;
- if( get_user_flags( j ) & szAdmins[ i ][ Flag ] )
- {
- if( g_bAdded[ j ] )
- continue;
- g_bAdded[ j ] = true
- if( g_iCounter )
- add( szString, charsmax( szString ), "^1,^3 " )
- g_iCounter ++
- get_user_name( j, szName, sizeof szName - 1 );
- add( szString, charsmax( szString ), szName );
- }
- }
- add( szString, charsmax( szString ), "^1." )
- if( !g_iCounter )
- ColorChat( client, "No ^4%ss^1 Online.", szAdmins[ i ][ Name ] )
- else
- ColorChat( client, "^4%ss^1 Online: %s", szAdmins[ i ][ Name ], szString )
- }
- }
- stock register_saycmd( const cmd[], const function[], flags = -1, const info[] = "", FlagManager = -1 )
- {
- new i, j;
- new szString[ 64 ];
- new const szSayTypes[ ][ ] = { "say", "say_team" };
- new const szTypes[ ][ ] = { "", "/", "!", "." };
- for( i = 0 ; i < sizeof szSayTypes ; i ++ )
- {
- for( j = 0 ; j < sizeof szTypes ; j ++ )
- {
- formatex( szString, sizeof szString - 1, "%s %s%s", szSayTypes[ i ], szTypes[ j ], cmd );
- register_clcmd( szString, function, flags, info, FlagManager );
- }
- }
- }
- stock ColorChat(index, const Msg[], any:... ) {
- new Buffer[190], Buffer2[192]
- formatex(Buffer2, sizeof(Buffer2)-1, "^4[^1LmX-Club`^4]^1 %s", Msg)
- vformat(Buffer, sizeof(Buffer)-1, Buffer2, 3)
- if(!index)
- {
- for (new i = 1; i <= get_maxplayers(); i++)
- {
- if(!is_user_connected(i))
- continue
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"),_, i)
- write_byte(i)
- write_string(Buffer)
- message_end()
- }
- }
- else
- {
- if(!is_user_connected(index))
- return
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"),_, index)
- write_byte(index)
- write_string(Buffer)
- message_end()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement