package TezC4
{
function Armor::onTrigger(%this, %player, %slot, %val)
{
if(isObject(%player.getMountedImage(0)))
{
if((%player.getMountedImage(0).getName() $= "C4Image" || %player.getMountedImage(0).getName() $= "C4DetonatorImage") && %slot $= 4 && %val)
{
switch$(%player.getMountedImage(0).getName())
{
case "C4Image":
%player.mountImage(C4DetonatorImage,0);
case "C4DetonatorImage":
%player.mountImage(C4Image,0);
}
}
else
{
Parent::onTrigger(%this, %player, %slot, %val);
}
}
else
{
Parent::onTrigger(%this, %player, %slot, %val);
}
}
};
ActivatePackage(TezC4);