Jump to content
GIGN Forum

Vai Ir Tads Plugin?


Recommended Posts

Pats pārbaudījis neesmu, bet AlliedModders forumā uzraku šo:

#include <amxmodx> 
#include <amxmisc> 

#define PLUGIN  "Admins Online" 
#define VERSION "1.0" 
#define AUTHOR  "ZombieMan" 

new maxplayers;
new admincvar;

public plugin_init() { 
   register_plugin( PLUGIN, VERSION, AUTHOR ); 
   set_task( 2.0, "adminsonline", 0, "", 0, "b" ); 
   
   maxplayers = get_maxplayers() 
   admincvar = register_cvar("amx_showadmins","1");
} 

public adminsonline() { 
   
   new id, count 
   
   for(id = 1; id <= maxplayers; id++) 
      if(is_user_connected(id)) 
      if(get_user_flags(id) & ADMIN_KICK) 
      count++
   
   if(get_pcvar_num(admincvar) ==1)
   {
      
      if (count>0)
      {
         
         if (count==1) {
            set_hudmessage(0,255, 0, 0.15, 0.00, 0, 6.0, 3700.0 ); 
            show_hudmessage(0, "There are %d Admins Online!",count );
         }
         else {
            set_hudmessage(0,255, 0, 0.15, 0.00, 0, 6.0, 3700.0 ); 
            show_hudmessage(0, "There are %d Admins Online!",count );
         }
      }
      else
      {
         set_hudmessage(255, 0, 0, 0.15, 0.00, 0, 6.0, 3700.0 ); 
         show_hudmessage(0, "No Admins online!",count );      
      }
   }
   
}

It kā visam vajadzētu strādāt!!!! :thumbsup:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...