Hello 
is it possible to know the name of the voted winning map at intermission with LUA ?
thanks to all
Hello 
is it possible to know the name of the voted winning map at intermission with LUA ?
thanks to all
Hm you can detect if the map is passed. I tried to make a mapfix so it always lowers the letters.
function et_Print(text)
if text == "mapvoteinfo: wrote" then --map fix
local nextmap = string.lower(et.trap_Cvar_Get( "nextmap" )) --lower mapname on intermission map vote
et.trap_Cvar_Set( "nextmap", nextmap )
end
end
You could try this and do something with getmapname (I think announce wont work because server is already in init).
function et_Print(text)
if text == "mapvoteinfo: wrote" then --map fix
getmapname = string.lower(et.trap_Cvar_Get( "nextmap" )) --output lower mapname: 'getmapname'
end
end
I think this is a part out of the source you are looking for:
if ( highMapVote > 0 ) {
trap_SendConsoleCommand( EXEC_APPEND,
va("map %s;set nextmap %s
",
level.mapvoteinfo[nextMap].bspName,
g_nextmap.string));
} else {
trap_SendConsoleCommand( EXEC_APPEND, "vstr nextmap
" );
}
} else {
trap_SendConsoleCommand( EXEC_APPEND, "vstr nextmap
" );