when you take otherones gun from the floor, 1 mag (?bullets) is added to your ammo count.i think it loads the same fx(function) as the gunshop at the buying time but it doesnt take your money,
see weaponinfo.xml for more information but the info you request might not be there.
also when you replace a pistol by a deagle (just example)the pistol fall down and it doesnt have the red light, so when you replace again the deagle by the pistol it multiply your ammo x2.
there is not much things i can tell you than this.i hope it was helpful