Well I think this is the easiest way to do that. You could, instead, write a value to a file and check if the function has been executed. If you're just trying to start a server with a specific map, check out the .bat below.
Code:
#include <amxmodx>
#define PLUGIN "Map Change"
#define VERSION "1.0"
#define AUTHOR "stupok69"
new cvar_meck
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
cvar_meck = register_cvar("amx_mecklenburg_mapchange", "1")
set_task(5.0, "delay_mapchange")
}
public delay_mapchange()
{
if(get_pcvar_num(cvar_meck))
{
set_pcvar_num(cvar_meck, 0)
server_cmd("changelevel mecklenburgv5_a6")
}
}
I use a .bat to start my server, it looks like this:
Code:
start /high hlds.exe -console -game ts -port 27017 -maxplayers 10 +map mecklenburg_b5