Your first sentence is the way to go!
Not advised the first thing you tell the cop is "I've got a gun!" - then reach for something in your clothes, like Philando Castile did.
Right?
hands in plain view when you say it and then do not move them unless the officer asks you to