No, you may not kill a cop for a ticket. However you're allowed to evade the cops if you want to avoid paying it. It's pretty abnormal to take out guns in such petty thing, don't you think?
E.G = example.
And no you can not kill a cop if he issued you a ticket, though if you had illegal materials on you and he came to frisk/taze you, you are allowed to take out a gun and defend yourself but attempting to kill him, if he issued you a normal ticket or is approaching you, you may run away on foot or vehicle doesn't matter.
Use common sense all the time, and you will be fine.