How to animate/rig gun for using in TPS game

Hello,

We are developing an open world game where a character can perform task like GTA series game. We are stuck at the gun animation part. We have attached gun to the character but how do we animate the gun and make it play during shooting, reloading or other actions. We have character animation ready for that but not the gun animations.