Gunpowder doesn’t need external oxygen to ignite. It’s an explosive. Gasoline is not an explosive, it’s a combustible. So to make a gasoline gun work you’d need a cartridge that has gasoline, air and most importantly a way to atomize the gas into a vapor (for most efficient combustion). In this case gunpowder wins…