Read mapcycle
Hi.
I`m having problems with this code, it doesn`t read the specified mapcycle, any help ?
Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("Mapcikls","0.1","xx")
load_mapcycle()
}
public load_mapcycle()
{
new hour[6];
get_time("%H",hour,5)
new hrs = str_to_num(hour)
if( hrs < 9 )
{
set_hudmessage(0, 100, 255, -1.0, 0.4, 0, 6.0, 3.0)
server_cmd("mapcyclefile mcycl/morning.txt")
}
if( hrs >= 10 )
{
server_cmd("mapcyclefile mcycl/day.txt")
}
if( hrs >= 23 )
{
server_cmd("mapcyclefile mcycl/night.txt")
}
return PLUGIN_CONTINUE
}
on exact time it must take the wright mapcycle.
|