by Ghost_Fang » Sun Jan 22, 2012 7:09 pm
Assuming you're engine doesn't support attachments (md3s or HLmdls) you would need to make your weapon model match your player model's frames, spawn the P_weapon, we'll call it, as a new entity and its owner be the player. And have the P_weapon's think update its origin to equal the player's origin, as well as the angles and frames, and have it update every frame or twice a frame. Its quite an easy thing to do, but for a beginner, it serves challenging.
Also, I assume you are making a Dead Space-like game, so you don't need to worry about visibility in first person, but if you do this in the future there is an extension to hide the third person gun for the client.