Don't like ads? PRO users don't see any ads ;-)
Guest

Advance Admins Online

By: 1liornatan on Aug 7th, 2012  |  syntax: None  |  size: 1.53 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4.  
  5. #define PLUGIN "Advance Admins Online"
  6. #define VERSION "1.1"
  7. #define AUTHOR "Lior"
  8. new g_MaxPlayers
  9. public plugin_init() {
  10.         register_plugin(PLUGIN, VERSION, AUTHOR)
  11.         g_MaxPlayers = get_maxplayers()
  12.         register_clcmd("say /admin", "admin")
  13. }
  14. public admin(id)
  15. {
  16.         client_print(0, print_chat, "DEBUG")
  17.         new iLen[5], string[5][200], iName[32]
  18.         iLen[0] += formatex(string[0], charsmax(string[0]), "Owners Online:")
  19.         iLen[1] += formatex(string[1], charsmax(string[1]), "Managers Online:")
  20.         iLen[2] += formatex(string[2], charsmax(string[2]), "Super Admins Online:")
  21.         iLen[3] += formatex(string[3], charsmax(string[3]), "Admins Online:")
  22.         iLen[4] += formatex(string[4], charsmax(string[4]), "Vips Online:")
  23.         for(new i;i < g_MaxPlayers;i++)
  24.         {
  25.                 if(!is_user_admin(i))
  26.                         continue;
  27.                 get_user_name(i, iName, 31)
  28.                 if(access(i, ADMIN_IMMUNITY))
  29.                         iLen[0] += formatex(string[0][iLen[0]], charsmax(string[0])-iLen[0], " %s,", iName)
  30.                 else if(access(i, ADMIN_RESERVATION))
  31.                         iLen[1] += formatex(string[1][iLen[1]], charsmax(string[1])-iLen[1], " %s,", iName)
  32.                 else if(access(i, ADMIN_KICK))
  33.                         iLen[2] += formatex(string[2][iLen[2]], charsmax(string[2])-iLen[2], " %s,", iName)
  34.                 else if(access(i, ADMIN_BAN))
  35.                         iLen[3] += formatex(string[3][iLen[3]], charsmax(string[3])-iLen[3], " %s,", iName)
  36.                 else
  37.                         iLen[4] += formatex(string[4][iLen[4]], charsmax(string[4])-iLen[4], " %s,", iName)
  38.         }
  39.         for(new i; i < 5;i++)
  40.                 ColorChat(id, GREEN, "%s", string[i])
  41.         return PLUGIN_HANDLED
  42. }