Dallas police say a man who was armed with a rifle shot himself in the moments after a police officer fired at him.