i have also seen this before but not while in a game. but how u normally fo it is have someone kill u and then press and hold r1 and dont let go of it and then have someone die right next to u and then press the button to pick up the gun and it should be invisible.
(if u press and hold r1 u shouldnt be able to move and if u let go of r1 the gun will reappear)