TacoServer/Classic/scripts/autoexec/AntiCloak.cs

25 lines
736 B
C#
Raw Normal View History

//Amount of players needed on server for CloakPack to be banned/unbanned
//
//$Host::AntiCloakEnable = 1;
//$Host::AntiCloakPlayerCount = 6;
2018-06-28 14:34:52 -04:00
2018-11-13 15:31:04 -05:00
//Called in GetCounts.cs
function ActivateAntiCloak()
2018-06-28 14:34:52 -04:00
{
2018-11-04 17:07:25 -05:00
//CTF only
if( $Host::AntiCloakEnable && $CurrentMissionType $= "CTF" )
{
//echo("TotalTeamPlayerCount " @ $TotalTeamPlayerCount);
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
2018-06-28 14:34:52 -04:00
2018-11-13 15:31:04 -05:00
//If server is in Tourny mode and the team population is lower than the AntiCloakPlayerCount cloak is not selectable.
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount )
2018-06-28 14:34:52 -04:00
$InvBanList[CTF, "CloakingPack"] = true;
2018-11-13 15:31:04 -05:00
//All other cases it is.
else
2018-11-13 15:31:04 -05:00
$InvBanList[CTF, "CloakingPack"] = false;
}
}