So I was creating a playertype that can't pick up guns/get in vehicles/get killed, etc. Well the packaged functions work fine for doing that to said playertype, however any other playertype gets teleported to 0 0 0 and I don't know what I did wrong, I just kinda named the arguments off of what they'd return in an echo, and added more to the end in case I left any out.
datablock playerData(Builder : PlayerStandardArmor)
{
Builder = true;
uiName = "Builder";
};
package ThorsBuilder
{
function weaponImage::onMount(%this,%player,%something,%a,%b,%c,%d,%e,%f)
{
if(%player.Datablock !$= "Builder")
{
parent::onMount(%this,%player,%something,%a,%b,%c,%d,%e,%f);
}
else
{
%name = %this.getName();
if(%name $= (PrintGunImage || WrenchImage || hammerImage))
{
parent::onMount(%this,%player,%something,%a,%b,%c,%d,%e,%f);
}
}
return;
}
function armor::onMount(%this,%player,%object,%something,%a,%b,%c,%d,%e,%f)
{
if(%player.Datablock !$= "Builder")
{
parent::onMount(%this,%player,%object,%something,%a,%b,%c,%d,%e,%f);
}
return;
}
function armor::onCollision(%this,%player,%Object,%something,%a,%b,%c,%d,%e,%f)
{
if(%player.Datablock !$= "Builder")
{
parent::onMount(%this,%player,%object,%something,%a,%b,%c,%d,%e,%f);
}
return;
}
function WheeledVehicleData::onCollision(%this,%object,%player,%cords,%a,%b,%c,%d,%e,%f)
{
if(%player.Datablock !$= "Builder")
{
parent::onCollision(%this,%object,%player,%cords,%a,%b,%c,%d,%e,%f);
}
return;
}
function GameConnection::onDeath(%this, %sourcePlayer, %sourceClient, %damageType, %damageArea)
{
if(%this.player.Datablock $= "Builder")
{
if(%damageType == $damageType::Self Delete)
{
parent::onDeath(%this, %sourcePlayer, %sourceClient, %damageType, %damageArea);
}
return;
}
parent::onDeath(%this, %sourcePlayer, %sourceClient, %damageType, %damageArea);
}
};
activatePackage(ThorsBuilder);