ok, delete the joints on your gun. after done, select the joint tool. once selected, click where you want the player to mount it (where the blockhead hand holds it). then, take the select tool, and click anywhere on the grid (not the mesh). select the joint tool again. select where you want the bullet to come out. Once thats done, use the select tool again. go to the joint menu, now. rename "joint1" to "mountPoint" (it is important you type it exactly as I type it, it is very case sensitive). Now, rename "joint2" to "muzzlePoint". THEN, flatshade, export, crap like that.
Hope this helped!