I haven't tried this, but it should work
function MyProjectile::onCollision(%this, %projectile, %obj, %fade, %trans, %norm)
{
if( %obj.getClassName() $= "Player" || %obj.getClassName() $= "AIPlayer" ) // Only respawn if it hits a player...
{
new Projectile()
{
dataBlock = %this;
initialVelocity = %projectile.getVelocity();
initialPosition = %projectile.getPosition();
sourceObject = %projectile.sourceObject;
sourceSlot = %projectile.sourceSlot;
};
}
}