From d9ee54045b094311bc3e81ce8159dd881a72ffdf Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Sun, 8 May 2022 13:53:25 -0400 Subject: [PATCH] Always obs --- Classic/scripts/autoexec/VoteMenu.cs | 32 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 611332a..d1c789b 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -1532,32 +1532,36 @@ function serverCmdClientJoinGame(%client) { if($LockedTeams) { - messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); + messageClient( %client, '', "Teams are locked. Wait to be assigned a team." ); return; } Parent::serverCmdClientJoinGame(%client); } +//exec("Scripts/autoexec/votemenu.cs"); function serverCmdClientPickedTeam(%client, %option) { - Parent::serverCmdClientPickedTeam(%client, %option); //Put first - if($LockedTeams) //Added - { - if($Host::TournamentMode && %client.team !$= 0) //Added - { - messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); - schedule(1000, 0, "ClearCenterPrint", %client); //So Press FIRE when ready is cleared, later down the pipe - serverCmdClientMakeObserver( %client ); - } - return; - } + if(!$Host::TournamentMode) + return; + + //All roads lead to observer + if( isObject(%client.player) ) + { + %client.player.scriptKill(0); + ClearBottomPrint(%client); + } + Game.forceObserver( %client, "playerChoose" ); + %client.observerMode = "observer"; + %client.notReady = false; + messageClient( %client, '', "Teams are locked. Wait to be assigned a team." ); + return; } function serverCmdClientTeamChange(%client, %option) { if($LockedTeams) { - messageClient( %client, '', "Teams are locked. Ask an admin to set your team." ); + messageClient( %client, '', "Teams are locked. Wait to be assigned a team." ); return; } Parent::serverCmdClientTeamChange(%client, %option); @@ -1613,4 +1617,4 @@ function VoteSound(%teamSpecific, %typename, %arg1, %arg2, %msg) echo(%vip SPC %msg); } } -} +} \ No newline at end of file