mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-16 00:24:35 +00:00
Added disable mech
This commit is contained in:
parent
72c4d0d69e
commit
62c0429f40
1 changed files with 45 additions and 5 deletions
|
|
@ -13,12 +13,52 @@ function ActivateAntiCloak()
|
||||||
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
||||||
|
|
||||||
//If server is in Tourny mode and the team population is lower than the AntiCloakPlayerCount cloak is not selectable.
|
//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 )
|
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount && !$CloakpackRunOnce )
|
||||||
|
{
|
||||||
$InvBanList[CTF, "CloakingPack"] = true;
|
$InvBanList[CTF, "CloakingPack"] = true;
|
||||||
//All other cases it is.
|
|
||||||
else
|
|
||||||
$InvBanList[CTF, "CloakingPack"] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if(!isActivePackage(DisableCloakPack))
|
||||||
|
activatePackage(DisableCloakPack);
|
||||||
|
|
||||||
|
$CloakpackRunOnce = false;
|
||||||
|
}
|
||||||
|
//All other cases it is.
|
||||||
|
else if( $CloakpackRunOnce )
|
||||||
|
{
|
||||||
|
$InvBanList[CTF, "CloakingPack"] = false;
|
||||||
|
|
||||||
|
if(isActivePackage(DisableCloakPack))
|
||||||
|
deactivatePackage(DisableCloakPack);
|
||||||
|
|
||||||
|
$CloakpackRunOnce = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//So if the player is able to get a cloakpack, he cant use it
|
||||||
|
package DisableCloakPack
|
||||||
|
{
|
||||||
|
|
||||||
|
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
|
{
|
||||||
|
if(%obj.client.armor $= "Light")
|
||||||
|
{
|
||||||
|
if(%obj.canCloak() $= "true")
|
||||||
|
{
|
||||||
|
messageClient(%obj.client, 'MsgCloakingPackOn', '\c2Cloakpack is disabled.');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue