Ok, I got the script done but in the console it says
Unknown Command Damage
function ProjectileData::damage(%this,%obj,%col,%fade,%pos,%normal)
{
if(%col.dataBlock.getName() $= "TankVehicle" || %col.dataBlock.getName() $= "GhostVehicle") //Only works on certain vehicles
{
if(%this.VehiDamage > 0)
{
%Vehidamage2 = %this.VehiDamage;
%damageType = $DamageType::Direct;
if(%this.DirectDamageType)
%damageType = %this.DirectDamageType;
%scale = getWord(%obj.getScale(), 2);
%NewDamage = mClampF(%this.Vehidamage, -100, 100) * %scale;
%col.damage(%obj, %pos, %NewDamage, %damageType);
}
}
parent::damage(%this,%obj,%col,%fade,%pos,%normal);
}