This is what I use for Slayer CTF:
package Slayer_Gamemode_CTF
{
function Player::mountImage(%this,%image,%slot,%a,%b)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;
parent::mountImage(%this,%image,%slot,%a,%b);
}
function Player::unMountImage(%this,%slot,%bypass)
{
%curImage = %this.getMountedImage(%slot);
if(!%bypass && isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;
parent::unMountImage(%this,%slot);
}
};
activatePackage(Slayer_Gamemode_CTF);
You could change that up for what you need. And you can get rid of the %bypass variable in unMountImage btw.