Well, this would be complicated, Someone that has an idea of the weapon functions could. You would have to declare what weapon prices are in a table. You would need to get the weapon index. ChangePlayerWeaponID(id) this is one of the many functions dealing with weapons I pulled out of the global script. You would maybe do the same for ammo, and then the shop script would be simple once you have that.
In the shop script you would need to check the players weapons and match the weapons to the table you created before and give the player however much money,
Sorry I can't offer any more info but I have yet to delve into the ammo_pool or weapon functions due to things going on and work, I had to pause my scripting.
Markchapman10 is my Skype let's have some dev talk.