Assuming you have made your Gun, Munition, and Explosion entries correctly in DATA\EQUIPMENT\weapon_equip.ini, then you need an entry in DATA\EQUIPMENT\weapon_good.ini similar to this example:-
<pre><font size=1 face=Courier>
{Good} <-- replace with square brackets
nickname = br_gun01_mark01 <-- your gun's name here
equipment = br_gun01_mark01 <-- and here
category = equipment
price = 42000
item_icon = equipment\models\commodities\nn_icons\equipicon_gun.3db
combinable = false
ids_name = 263386 <-- your guns name infocard number here
ids_info = 264386 <-- your guns description infocard number here
shop_archetype = equipment\models\weapons\br_mass_driver.cmp
material_library = equipment\models\br_equip.mat
</font></pre>
And then you need to make an entry for it in the base you want, in DATA\EQUIPMENT\market_misc.ini like this example:-
<pre><font size=1 face=Courier>
{BaseGood} <-- use square brackets again
base = Ku01_01_base
MarketGood = ku_gun01_mark01, 0, 0.200000, 10, 10, 0, 1
MarketGood = ku_gun01_mark03, 0, 0.400000, 10, 10, 0, 1
</font></pre>
In the first line, the ku_gun01_mark01, 0, 0.200000, means the player has to be of at least rank 0, and at least 20% friendly to the base faction to be able to buy it. The 10, 10, 0 means the base sells it (actually stock and buyable quantities and something else, but aren't implemented so use these standard values to ensure it will work), and the last '1' means it's sold at 100% of normal price, which is taken from the weapon_good.ini entry.
In the second line you can see the player has to be 40% friendly to be able to buy the improved Mark03 gun.
Hope this helps.
Roleplay: - the art of self-deceipt!