Here

Firearms work differently from other ranged projectile weapon s— they instead use the following rules.

Firearm Proficiency: The Exotic Weapon Proficiency (firearms) feat allows you to use all firearms without penalty. A nonproficient character takes the standard –4 penalty on attack rolls with firearms, and a nonproficient character who loads a firearm increases the misfire value by 4 for the shots he loads.

Firearm Attacks: When firing an early firearm, the attack resolves against the target’s touch AC when the target is within the first range increment of the weapon, but this type of attack is not considered a touch attack for the purposes of feats and abilities such as Deadly Aim. At higher range increments, the attack resolves normally, including taking the normal cumulative –2 penalty for each full range increment. Unlike other projectile weapons, firearms have a maximum range of five range increments.

Armor, whether manufactured or natural, provides little protection against the force of a bullet at short range.

Loading a Firearm: You need at least one hand free to load one-handed and two-handed firearms. In the case of two-handed firearms, you hold the weapon in one hand and load it with the other—you only need to hold it in two hands to aim and shoot the firearm. Loading siege firearms requires both hands, and one hand usually manipulates a large ramrod (which can be wielded as a club in combat). The Rapid Reload feat reduces the time required to load one-handed and two-handed firearms, but this feat does not reduce the time it takes to load siege firearms.

All firearms are muzzle-loaded, requiring bullets or pellets and black powder to be rammed down the muzzle. If an early firearm has multiple barrels, each barrel must be loaded separately. It is a standard action to load each barrel of a one-handed early firearm and a full-round action to load each barrel of a two-handed early firearm. It takes three full-round actions by one person to load a siege firearm. This can be reduced to two full-round actions if more than one person is loading the cannon.

Loading any firearm provokes attacks of opportunity.

Misfires: If the natural result of your attack roll falls is equal to or less than a firearm’s misfire value, that shot misses, even if you would have otherwise hit the target. When a firearm misfires, it gains the broken condition. While it has the broken condition, it cannot fire properly (saving a heroic, last-ditch natural 20 style effort), and requires a full-round action to repair. Early versions of firearms may be permanently damaged or explode when misfiring.