
   #include <amxmod>
   #include <file>
   public zeroplayershandle(){
       new timelimit[33]
       get_cvar_string("mp_timelimit",timelimit,32)
       if(!get_playersnum()    &&    (str_to_num(timelimit)    *   60   -
   get_timeleft()) > 900){
           if(file_exists("addons/amx/popularmaps.cfg")){
               new data[33]
               new len
               new i
               new j = 0
               new maps[50][33]
               for(i = 1;
   read_file("addons/amx/popularmaps.cfg",i,data,32,len);i++){
                   read_file("addons/amx/popularmaps.cfg",i,data,32,len)
                   if(is_map_valid(data)){
                       format(maps[j],32,"%s",data)
                       j++
                   }
               }
               j++
               i = random(j)
               server_cmd("changelevel %s", maps[i])
           }
       }
   }
   public plugin_init(){
       register_plugin("Zero Players Handler", "0.0", "LGBR")
       set_task(1.0,"zeroplayershandle", 0, "", 0, "b")
       return PLUGIN_CONTINUE
   }
