I am editing mapchooser.sma so that on my server after a "next Map Vote" has completed it not only sets the cvar amx_nextmap but also sets a mod specific cvar "agnextmap". Im not sure how to go about this. I tried a few things but was unsuccessful and too new yet. I think this is the area I should be in though...
Code:
public checkVotes() {
new b = 0
for (new a = 0; a < g_mapVoteNum; ++a)
if (g_voteCount[b] < g_voteCount[a])
b = a
if ( g_voteCount[SELECTMAPS] > g_voteCount[b] ) {
new mapname[32]
get_mapname(mapname,31)
new Float:steptime = get_cvar_float("amx_extendmap_step")
set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + steptime )
client_print(0,print_chat,"%L", LANG_PLAYER, "CHO_FIN_EXT", steptime )
log_amx("Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes",
mapname , steptime )
return
}
if ( g_voteCount[b] && g_voteCount[SELECTMAPS+1] <= g_voteCount[b] )
set_cvar_string("amx_nextmap", g_mapName[g_nextName[b]] )
new smap[32]
get_cvar_string("amx_nextmap",smap,31)
client_print(0,print_chat,"%L", LANG_PLAYER, "CHO_FIN_NEXT", smap )
log_amx("Vote: Voting for the nextmap finished. The nextmap will be %s", smap)
}
__________________