You must not be host for this to wok. To drop your gun, walk up to a weapon that you can swap with (cannot be grenades or a pistol) and hold X. Immediately after you press X, hold B. This will cause you to drop your gun. While you have no gun in your hands, you cannot shoot or punch-- but you can still switch weapons.