i don't know if you have to be signed in or so to view the topic but else the link doesn't work could you pleas give me a working link?
this is what i made from a code i found on this forum:
Code:
SpectatorOnDeath()
{
self waittill( "death" );
self notify("menuresponse", game["menu_team"], "spectator");
setDvar( "ui_allow_teamchange", "0" );
self thread selectrandommap();
}
selectrandommap()
{
if (level.playerCount["axis"] == 0 && level.team["axis"] != 0 && level.playerCount["allies"] == 0 && level.team["allies"] != 0){
wait 3;
iPrintlnBold("This round is over!");
wait 2;
iPrintlnBold("Searching for new map...");
wait 2;
iPrintlnBold("Searching for new map...");
wait 2;
iPrintlnBold("New map found changing now!");
wait 2;
mapnames = "mp_brecourt;mp_rundown;mp_afghan;mp_checkpoint;mp_quarry;mp_highrise;mp_boneyard;mp_derail;mp_rust;mp_favela;mp_estate;mp_terminal;mp_underpass;mp_subbase;mp_invasion;";
mapa = getDvar("mapname");
mapchoice = StrTok( mapnames, ";" );
newmap = mapchoice[randomint(mapchoice.size)];
while(newmap == mapa) {
newmap = mapchoice[randomint(mapchoice.size)];
}
Map(newmap, false);}
}
but it changes instantly to a other map if someone dies and does wait for the teams to be 0