From eb6fb5d5776ce509845e09be210b4ee5083246cd Mon Sep 17 00:00:00 2001 From: ChocoTaco Date: Mon, 21 Jan 2019 12:21:59 -0500 Subject: [PATCH] Formatting --- Classic/scripts/autoexec/GetTeamCounts.cs | 19 ++++++++++++------- Classic/scripts/autoexec/PUGpasscheck.cs | 9 +++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Classic/scripts/autoexec/GetTeamCounts.cs b/Classic/scripts/autoexec/GetTeamCounts.cs index d07a60f..873f99d 100644 --- a/Classic/scripts/autoexec/GetTeamCounts.cs +++ b/Classic/scripts/autoexec/GetTeamCounts.cs @@ -1,22 +1,27 @@ -//This function is Called at: -//CreateServer(%mission, %missionType) in Server.cs +// GetCounts was made to accurately keep track of how many players +// are on teams, on the server, on each team, spectator, etc. +// It runs every 5 seconds. +// It has since evolved into the place to inject other services +// and aspects within the server. +// // -//To control whether the server auto resets when empty -//$Host::EmptyServerReset = 0; +// To control whether the server auto resets when empty +// $Host::EmptyServerReset = 0; package StartTeamCounts { - function CreateServer( %mission, %missionType ) { parent::CreateServer( %mission, %missionType ); + //Call for a GetTeamCount update + GetTeamCounts( %game, %client, %respawn ); + + //Make sure teamchange variable is set ResetClientChangedTeams(); //Whether the server auto restarts when empty or not $Host::Dedicated = $Host::EmptyServerReset; - //Call for a GetTeamCount update - GetTeamCounts( %game, %client, %respawn ); } }; diff --git a/Classic/scripts/autoexec/PUGpasscheck.cs b/Classic/scripts/autoexec/PUGpasscheck.cs index 78eedd3..4c7bbc6 100644 --- a/Classic/scripts/autoexec/PUGpasscheck.cs +++ b/Classic/scripts/autoexec/PUGpasscheck.cs @@ -1,7 +1,7 @@ -//To activate a password in certain gamemodes -//called in Getcounts.cs -//and also other options like distance and speed -//turn tournament mode off when switched to lak +// To activate a password in certain gamemodes +// called in Getcounts.cs +// and also other options like distance and speed +// turn tournament mode off when switched to lak // Variables // Add these to ServerPrefs @@ -12,6 +12,7 @@ // $Host::PUGautoPasswordLimit = 10; // The PUG password you want // $Host::PUGPassword = "pickup"; +// function CheckPUGpassword() {