Jump to content

Modern warfare 2 #6 demolition auto-balance


Recommended Posts

  • 4 weeks later...

there are ways, demolition auto balance is setup like S&D team balance that will balance you at the end of rounds, as in team deathmatch it makes sure every 15 seconds, all that needs doing is a change in the code to make it reads the team balance differently, if you need a hand in this give me a shout and i can give you the code changes as i got em ( took less than 2 mins to change :D )

Edited by Beansy Boy
Link to comment
Share on other sites

My Code

This is designed only for demoliton, i wouldnt use this code if it was for any other gametype such as search and destroy

updateTeamBalance()

{

level.serverclients = 16; // Server Clients On Demoliton Server But If Dvarred would be good

level.teamLimit = level.serverclients / 2;

level thread updateTeamBalanceDvar();

wait .15;

if ( level.teamBalance && !isRoundBased() ) // Put The ! in so it threads if it is not roundbased rather than is roundbased

{

if( isDefined( game["BalanceTeamsNextRound"] ) )

iPrintLnbold( &"MP_AUTOBALANCE_NEXT_ROUND" );

// TODO: add or change

level waittill( "restarting" );

if( isDefined( game["BalanceTeamsNextRound"] ) )

{

level balanceTeams();

game["BalanceTeamsNextRound"] = undefined;

}

else if( !getTeamBalance() )

{

game["BalanceTeamsNextRound"] = true;

}

}

else

{

level endon ( "game_ended" );

for( ;; )

{

if( level.teamBalance )

{

if( !getTeamBalance() )

{

iPrintLnBold( &"MP_AUTOBALANCE_SECONDS", 5 ); // Made it quicker to even teams from 15 seconds to 5 seconds

wait 5.0;

if( !getTeamBalance() )

level balanceTeams();

}

wait 29.0; // check time is 30 seconds rather than 1 minute

}

wait 1.0;

}

}

}

Default Code

updateTeamBalance()

{

level.teamLimit = level.maxclients / 2;

level thread updateTeamBalanceDvar();

wait .15;

if ( level.teamBalance && isRoundBased() )

{

if( isDefined( game["BalanceTeamsNextRound"] ) )

iPrintLnbold( &"MP_AUTOBALANCE_NEXT_ROUND" );

// TODO: add or change

level waittill( "restarting" );

if( isDefined( game["BalanceTeamsNextRound"] ) )

{

level balanceTeams();

game["BalanceTeamsNextRound"] = undefined;

}

else if( !getTeamBalance() )

{

game["BalanceTeamsNextRound"] = true;

}

}

else

{

level endon ( "game_ended" );

for( ;; )

{

if( level.teamBalance )

{

if( !getTeamBalance() )

{

iPrintLnBold( &"MP_AUTOBALANCE_SECONDS", 15 );

wait 15.0;

if( !getTeamBalance() )

level balanceTeams();

}

wait 59.0;

}

wait 1.0;

}

}

}

i hope this helps ya and this lives in the _teams.gsc file

Edited by Beansy Boy
Link to comment
Share on other sites

atm it is every round which works if people stuck to their original teams and didnt team switch when they were losing or go to spectate so its like 9 - 4 or somethin, but the times can be adjusted

wait 29.0; // check time is 30 seconds rather than 1 minute

change the wait timer for however long you want it in seconds

Link to comment
Share on other sites

My Code

This is designed only for demoliton, i wouldnt use this code if it was for any other gametype such as search and destroy

Default Code

i hope this helps ya and this lives in the _teams.gsc file

Thank you, I will see if I can change/ test over the weekend. Appreciate your input. Which folder is the file?

Edited by Whoops
Link to comment
Share on other sites

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.