How do you get your friend to stop shooting you with a bb gun?

Tell your parents. Ask them to talk to ur friend's parents. If it's at a certain place (ex:park) where you keep getting shot at and it doesn't stop, (this has happened in my city)

call the police. Don't call emergency though.