In the very few times that the victim has a gun, Hollywood has gone out of its way to make sure that the use was either illegal or morally questionable.
I can't think of a show where the use of a firearm in self defense was actually shown to be within the law. But then the majority, not all, of TV and movies are in the big cities like New York, Chicago and Los Angeles. All places where gun ownership is illegal or frowned upon.
NRA Chief Range Safety Officer, Home Firearms Safety, Pistol and Rifle Instructor
"There are three classes of people: those who see, those who see when they are shown, those who do not see."
Leonardo da Vinci