hey
im trying to figure this out ... i want to have music play at the end of the map, via the plugin MapEnd-Sounds (search it) .. before i switched to Deags' map manager, the mapend sounds work fine, having the mp_chattime 20.0 was perfect.
but with deagmapmanager, it appears the mp_chattime is hardcoded into the plugin, forcing this cvar, and making the MapEnd-sounds plugin redundant.. cos dmap would change the map too quickly.
soo im trying to slow it down, by editing the .sma ... i been playing around on my own, but im not getting what i need. I change the mp_chattime within the script to 20.0, it doesnt work, it still switches too fast, as though it doesnt make a difference. then i changed the "set_task" for "DelayedChange" to 20.0 , and now, the map end time is fine, the music plays and all, and it works.
but it switches to the wrong map.. instead of switching to the map selected by votes/dmap, it switcches to the next map on the server's mapcycle.txt file.. it doesnt change to the one voted for/chosen by amx_nextmap.
can anyone care to help out a lil'?
Code:
public levelchange(){
if(istimeset2==1)
{ //Allow automatic map change to take place.
set_cvar_float("mp_timelimit",get_cvar_float("mp_timelimit")-2.0)
istimeset2=0
}
else{
if(get_cvar_float("mp_timelimit")>=4.0){ //Allow automatic map change to take place.
if(!istimeset)
oldtimelimit=get_cvar_float("mp_timelimit")
set_cvar_float("mp_timelimit",get_cvar_float("mp_timelimit")-3)
istimeset=1
}else
if(get_cvar_num("mp_winlimit")) //Allow automatic map change based on teamscores
{
new largerscore
largerscore=(teamscore[0]>teamscore[1])?teamscore[0]:teamscore[1]
iswinlimitset=1
oldwinlimit=get_cvar_num("mp_winlimit")
set_cvar_num("mp_winlimit",largerscore)
}
}
//If we are unable to achieve automatic level change, FORCE it.
set_task(2.1,"DelayedChange",444444)
}
public changeMap(){ //Default event copied from nextmap.amx, and changed around.
set_cvar_float( "mp_chattime" , 18.0 ) // make sure mp_chattime is long
remove_task(444444)
set_task( 18.0 , "DelayedChange")
}
public DelayedChange(){
new smap[32]
get_cvar_string("amx_nextmap",smap,31)
server_cmd( "changelevel %s", smap )
this is currently the code im running off, that im having trouble with, the map is not changing to the one players vote for, and changes to the server's mapcycle.txt map.
need help .. =/