mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Added more mechanisms to prevent double msgs
This commit is contained in:
parent
25247ee91f
commit
13dfaa0809
1 changed files with 20 additions and 16 deletions
|
|
@ -24,6 +24,8 @@ function TeamBalanceNotify( %game, %client, %respawn )
|
||||||
$BalancedMsgPlayed = 0;
|
$BalancedMsgPlayed = 0;
|
||||||
|
|
||||||
if( %Team1Difference >= 2 || %Team2Difference >= 2 )
|
if( %Team1Difference >= 2 || %Team2Difference >= 2 )
|
||||||
|
{
|
||||||
|
if( $StatsBalancedSoundPlayed !$= 1 )
|
||||||
{
|
{
|
||||||
if( $UnbalancedMsgPlayed !$= 1 && %Team2Difference == 2 || %Team1Difference == 2 )
|
if( $UnbalancedMsgPlayed !$= 1 && %Team2Difference == 2 || %Team1Difference == 2 )
|
||||||
{
|
{
|
||||||
|
|
@ -41,14 +43,16 @@ function TeamBalanceNotify( %game, %client, %respawn )
|
||||||
$StatsMsgPlayed = 1;
|
$StatsMsgPlayed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $StatsBalancedSoundPlayed !$= 1 )
|
|
||||||
{
|
|
||||||
//Called in 30 secs with sound
|
//Called in 30 secs with sound
|
||||||
schedule(30000, 0, "StatsUnbalanceSound");
|
schedule(30000, 0, "StatsUnbalanceSound");
|
||||||
//Once per cycle.
|
//Once per cycle.
|
||||||
$StatsBalancedSoundPlayed = 1;
|
$StatsBalancedSoundPlayed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if( $PlayerCount[1] !$= $PlayerCount[2] )
|
||||||
|
{
|
||||||
|
$StatsBalancedSoundPlayed = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//If teams are balanced and teams dont equal 0.
|
//If teams are balanced and teams dont equal 0.
|
||||||
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && $BalancedMsgPlayed !$= 1 )
|
else if( $PlayerCount[1] == $PlayerCount[2] && $TotalTeamPlayerCount !$= 0 && $BalancedMsgPlayed !$= 1 )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue