
   /* AMX Mod script.
   *
   * Daily Config/Mapcycle
   *
   *
   */
   #include <amxmod>
   new filepath1[] = "addons/configs/map/"
   new filepath2[] = "addons/configs/cfg/"
   public loadMapcycle() {
       new today[8], filename[128]
       get_time("%a",today,8)
       format(filename,127,"%s/%s.cfg",filepath1,today)
       if (file_exists(filename))
       {
           server_cmd("mapcyclefile %s",filename)
       }
       else
       {
           format(filename,127,"%sStan.cfg",filepath1)
           server_cmd("mapcyclefile %s",filename)
       }
       return PLUGIN_CONTINUE
   }
   public loadSettings() {
       new today[8], filename[128]
       get_time("%a",today,8)
       format(filename,127,"%s%s.cfg",filepath2,today)
       if (file_exists(filename))
       {
           server_cmd("exec %s",filename)
       }
       else
       {
           format(filename,127,"%sStan.cfg",filepath2)
           server_cmd("exec %s",filename)
       }
       return PLUGIN_CONTINUE
   }
   public mapSettings() {
       new currentmap[32], filename[128]
       get_mapname(currentmap,31)
       format(filename,127,"%s/%s.cfg",filepath1,currentmap)
       if (file_exists(filename))
           server_cmd("exec %s",filename)
       return PLUGIN_CONTINUE
   }
   public plugin_init() {
       register_plugin("Config", "1.0", "Starscream")
       loadMapcycle()
       set_task(2.0,"loadSettings",0)
       set_task(3.0,"mapSettings",0)
   }
