On multiplayer, select a gun with a bipod attachment. Lay down, deploy the bipod, and press Left Analog-stick Up. The ammo bar will disappear and can now fire as long as desired without reloading or running out of ammo.
Get a machine gun that can be mounted and mount it onto something or just the plain floor. Press Left Analog-stick Up and your ammo bar will disappear, giving you ammunition only when it is mounted.