Where exactly is the problem?

I guess you just have to render your weapon model at the position and rotation of the camera...

Greetings