I had been posting in suggestions/requests, but this forum seemed more appropriate.... If this is not the proper forum for this, I apologize.
Code:
#include <amxmodx>
public load_mapcycle()
{
new today_str[8], cmd[48]
get_time("%H",today_str,8)
new today = str_to_num(today_str)
if ((today >= 0) && (today < 9))
format(cmd,48,"mapcyclefile addons/amxx/configs/morning.txt",today)
else if ((today >= 9) && (today < 18))
format(cmd,48,"mapcyclefile addons/amxx/configs/day.txt",today)
else if (today >= 18)
format(cmd,48,"mapcyclefile addons/amxx/configs/evening.txt",today)
server_cmd(cmd)
return PLUGIN_HANDLED
}
public plugin_init()
{
register_plugin("Rotating Mapcycle-JustinHoMi","0.2","devicenull")
load_mapcycle()
return PLUGIN_CONTINUE
}
Would anyone be interested in testing this on their server? What it is supposed to do is change your mapcyle according to time of day. You make a mapcycle called "day.txt" which covers from 9am to 6pm, "evening.txt" which covers 6pm to 12am, and "morning.txt" which covers 12am to 9am.
This could be helpful in that you could have a lot of lesser played or custom maps in the cycle for primetime, but then have only more popular maps in the cycle during later hours, to keep everyone happy and keep the server populated. I feel that it is a very useful idea, and I would really like to see it work.
On my server, when I enable this plugin, the server gets stuck on dust2. Then if we change the map to something else, it gets stuck in a loop on that map. I would like to see if it works on other servers to find out if it is just something specific to our server.
Devicenull had been trying to work at it a little.
Thanks to anyone ahead of time.
__________________