SHARE
TWEET

who

a guest Oct 18th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include < amxmodx >
  2.  
  3. #define PLUGIN "HUD MOD"
  4. #define VERSION "0.4x"
  5. #define AUTHOR "eVoLuTiOn +"
  6.  
  7. #define MAX_GROUPS      12
  8. #define MAX_FLAGS       12
  9.  
  10.  
  11. new const g_szWhoGroups[ MAX_GROUPS ][ ] =
  12. {
  13.         "Detinator",
  14.         "Fondator",
  15.         "Owner + V.I.P",
  16.         "Co-Owner + V.I.P",
  17.         "Co-Owner",
  18.         "Moderator + V.I.P",
  19.         "Moderator",
  20.         "Administrator + V.I.P",
  21.         "Administrator",
  22.         "Helper + V.I.P",
  23.         "Helper",
  24.         "Slot"
  25. };
  26.  
  27. new const g_szWhoFlags[ MAX_FLAGS ][ ] =
  28. {
  29. "abcdefghijklmnopqrstuxw",
  30. "abcdefghijklmnopqrstu",
  31. "abcdefghijmnoqprstu",
  32. "abcdefghijmnqprst",
  33. "abcdefghijmnps",
  34. "bcdefghijmqrt",
  35. "bcdefghijm",
  36. "bcdefijmqrt",
  37. "bcdefijm",
  38. "bcfeijqrt",
  39. "bcfeij",
  40. "b"
  41.  
  42. };
  43.  
  44. public plugin_init( ) {
  45.     register_plugin( PLUGIN, VERSION, AUTHOR );
  46.  
  47.     register_clcmd("say /who", "dr_who");
  48. }
  49.  
  50. public dr_who( id )
  51. {
  52.    
  53.     new iPlayers[ 32 ], iCount, iLen, szMotd[ 2048 ]
  54.     get_players( iPlayers, iCount, "ch" );
  55.  
  56.     iLen = format( szMotd[ iLen ], charsmax(szMotd) - iLen, "\w[\rDr.Evils.Ro\w] \yStaff \rSERVER \w!^n^n" );
  57.  
  58.     for( new p = 0; p < iCount; p++ )
  59.     {
  60.         static player;
  61.         player = iPlayers[ p ];
  62.  
  63.         for( new i = 0; i < MAX_FLAGS; i++ )
  64.         {
  65.             if( get_user_flags( player ) == read_flags( g_szWhoFlags[ i ] ) )
  66.             {
  67.                 static szName[ 32 ];
  68.                 get_user_name( player, szName, sizeof( szName ) -1 );
  69.  
  70.                 iLen += format( szMotd[ iLen ], charsmax(szMotd) - iLen, "\w[\yNUME\w: \r%s\w] \y-> \w[\yGRAD\w: \r%s\w]^n", szName, g_szWhoGroups[ i ] );
  71.             }
  72.         }
  73.         show_menu( id, ( 1 << 1 || 1 << 2 || 1 << 3 || 1 << 4 || 1 << 5 || 1 << 6 || 1 << 7 || 1 << 8 || 1 << 9 || 1 << 0 ), szMotd, -1 );
  74.     }
  75. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top