Gunslingers start with a gun at first level.
This is granted by the Gunsmith class feature:
Gunsmith
At 1st level, a gunslinger gains one of the following firearms of her choice: blunderbuss, musket, or pistol. Her starting weapon is battered, and only she knows how to use it properly. All other creatures treat her gun as if it had the broken condition. If the weapon already has the broken condition, it does not work at all for anyone else trying to use it. This starting weapon can only be sold for scrap (it’s worth 4d10 gp when sold). The gunslinger also gains Gunsmithing as a bonus feat.
Plus, she can craft her own firearms and ammunition using the Gunsmithing feat gained for free.
Crafting Firearms: You can craft any early firearm for a cost in raw materials equal to half the price of the firearm.
Crafting Ammunition: You can craft bullets, pellets, and black powder for a cost in raw materials equal to 10% of the price.
Guns Everywhere
If the Guns Everywhere alternate firearms rule is defined by the GM, then crafting them is much cheaper, going for 10% of the value listed on the tables:
Guns Everywhere: Guns are commonplace. Early firearms are seen as antiques, and advanced firearms are widespread. Firearms are simple weapons, and early firearms, advanced guns, and their ammunition are bought or crafted for 10% of the cost listed in this chapter. The Gunslinger loses the gunsmith class feature and instead gains the gun training class feature at 1st level.