Core pins for die casting and plastic moulding