Peterson and Ranui jointly admitted unlawfully possessing a 9mm Walther Pal K1 pistol.
Ranui also admitted charges of supplying at least 84g of methamphetamine and having a further 1148g of the same drug in his possession for supply.
The offences were committed between May 1, 2015, and December 20, 2016, in Tauranga and elsewhere in New Zealand.
The Crown's summary of facts revealed the charges stemmed from an 18-month undercover police covert operation code-named Operation Centurion.
Operation Centurion was centred around the Head Hunter motorcycle gang and its alleged involvement in the supply of methamphetamine in the Bay of Plenty.
The Crown said during the inquiry, one of the gang's associates, Joshua Petersen, was directly involved in the supply of at least 691g of P to at least nine people within the Bay of Plenty.
Those people then on-sold the drugs.
Petersen used a family-owned industrial shed on the outskirts of Ōpōtiki as a base for his drug-dealing, the Crown summary said.
During searches of the shed, police found firearms, ammunition and bulk amounts of methamphetamine and cocaine.
At one point during the inquiry, police tracked Petersen's vehicle and found a bucket containing about $224,000 cash hidden in the undergrowth near his Ōpōtiki home.
Petersen also sought wholesale quantities of ephedrine.
The role of Mark Morgan, a Head Hunter prospect, was that of the "front man", responsible for the delivery of methamphetamine to wholesale customers.
Ranui, another Head Hunter prospect, had responsibilities including counting the money, and the safe storage of the cash, firearms and illegal commodities, the Crown said.
Ranui had at least four locations in the Tauranga area he used for this purpose.
Justice Matthew Downs, who remanded Morgan, Ranui and Petersen for sentencing in the Tauranga High Court on December 11, said prison sentences were "inevitable".