A police officer decides whether to give you a ticket or just a warning ...
Before they turn on their blue lights
Before they leave their vehicle
After seeing your license and registration
After having all questions they ask you answered