mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-13 15:14:34 +00:00
Update AntiPack.cs
Packs can now be choosin' individually
This commit is contained in:
parent
bdf5639238
commit
e382ec04f2
1 changed files with 27 additions and 7 deletions
|
|
@ -9,6 +9,11 @@
|
||||||
// $Host::AntiPackPlayerCount = 6;
|
// $Host::AntiPackPlayerCount = 6;
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// Choose which packs to limit
|
||||||
|
$AntiPackIncludeCloak = 1;
|
||||||
|
$AntiPackIncludeShield = 0;
|
||||||
|
|
||||||
|
|
||||||
// Called in GetCounts.cs
|
// Called in GetCounts.cs
|
||||||
function CheckAntiPack( %game )
|
function CheckAntiPack( %game )
|
||||||
{
|
{
|
||||||
|
|
@ -40,16 +45,26 @@ function CheckAntiPack( %game )
|
||||||
switch$($AntiPackStatus)
|
switch$($AntiPackStatus)
|
||||||
{
|
{
|
||||||
case ON:
|
case ON:
|
||||||
$InvBanList[CTF, "CloakingPack"] = 1;
|
if($AntiPackIncludeCloak)
|
||||||
$InvBanList[CTF, "ShieldPack"] = 1;
|
{
|
||||||
if(!isActivePackage(AntiPack))
|
$InvBanList[CTF, "CloakingPack"] = 1;
|
||||||
activatePackage(AntiPack);
|
if(!isActivePackage(AntiPackCloak))
|
||||||
|
activatePackage(AntiPackCloak);
|
||||||
|
}
|
||||||
|
if($AntiPackIncludeShield)
|
||||||
|
{
|
||||||
|
$InvBanList[CTF, "ShieldPack"] = 1;
|
||||||
|
if(!isActivePackage(AntiPackShield))
|
||||||
|
activatePackage(AntiPackShield);
|
||||||
|
}
|
||||||
$AntiPackStatus = "ACTIVEON";
|
$AntiPackStatus = "ACTIVEON";
|
||||||
case OFF:
|
case OFF:
|
||||||
$InvBanList[CTF, "CloakingPack"] = 0;
|
$InvBanList[CTF, "CloakingPack"] = 0;
|
||||||
$InvBanList[CTF, "ShieldPack"] = 0;
|
$InvBanList[CTF, "ShieldPack"] = 0;
|
||||||
if(isActivePackage(AntiPack))
|
if(isActivePackage(AntiPackCloak))
|
||||||
deactivatePackage(AntiPack);
|
deactivatePackage(AntiPackCloak);
|
||||||
|
if(isActivePackage(AntiPackShield))
|
||||||
|
deactivatePackage(AntiPackShield);
|
||||||
$AntiPackStatus = "ACTIVEOFF";
|
$AntiPackStatus = "ACTIVEOFF";
|
||||||
case ACTIVEON:
|
case ACTIVEON:
|
||||||
//Do Nothing
|
//Do Nothing
|
||||||
|
|
@ -59,7 +74,7 @@ function CheckAntiPack( %game )
|
||||||
}
|
}
|
||||||
|
|
||||||
// So if the player is able to get said pack, he cant use it
|
// So if the player is able to get said pack, he cant use it
|
||||||
package AntiPack
|
package AntiPackCloak
|
||||||
{
|
{
|
||||||
|
|
||||||
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
|
|
@ -75,6 +90,11 @@ function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
package AntiPackShield
|
||||||
|
{
|
||||||
|
|
||||||
function ShieldPackImage::onActivate(%data, %obj, %slot)
|
function ShieldPackImage::onActivate(%data, %obj, %slot)
|
||||||
{
|
{
|
||||||
messageClient(%obj.client, 'MsgShieldPackInvalid', '\c2Shieldpack is disabled until %1 players.', $Host::AntiPackPlayerCount );
|
messageClient(%obj.client, 'MsgShieldPackInvalid', '\c2Shieldpack is disabled until %1 players.', $Host::AntiPackPlayerCount );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue