TacoServer/Classic/scripts/autoexec/AntiCloak.cs

28 lines
898 B
C#
Raw Normal View History

//Amount of players needed on server for CloakPack to be banned/unbanned
//
//$Host::AntiCloakEnable = 1;
//$Host::AntiCloakPlayerCount = 6;
//
//TotalTeamCount based on how many on team, not how many on the server.
2018-06-28 18:34:52 +00:00
//Called in GetCounts
function ActivateAntiCloak()
2018-06-28 18:34:52 +00:00
{
2018-11-04 22:07:25 +00:00
//CTF only
if( $Host::AntiCloakEnable && $CurrentMissionType $= "CTF" )
{
//echo("TotalTeamPlayerCount " @ $TotalTeamPlayerCount);
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
2018-06-28 18:34:52 +00:00
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount )
//If server is in Tourny mode or if the server population isnt higher than the AntiCloakPlayerCount the CloakPack is not selectable.
2018-06-28 18:34:52 +00:00
$InvBanList[CTF, "CloakingPack"] = true;
else
//If AntiCloakPlayerCount is lower than server population, CloakPack is enabled and Selectable.
2018-06-28 18:34:52 +00:00
$InvBanList[CTF, "CloakingPack"] = false;
}
}