Pointshop Dilemma

So, I’ve trying to figure out how to add weapons to my pointshop, simple right? Not exactly, what my goal is: To make it so the weapon is just a skin for the guns on the map, such as the m16, mac10, shotgun etc. To do this, I’d need to add the skin to the pointshop, and not allow it to be a permanent weapon, only cosmetic. Any ideas?

You could probably do something like this:

[lua]
ITEM.Model = ‘models/weapon/w_m16.mdl’
ITEM.WeaponClass = ‘m16’
ITEM.Skin = 2

ITEM:CanPlayerEquip(ply)
return ply:HasWeapon(self.WeaponClass)
end

ITEM:OnEquip(ply)
ply:GetWeapon(self.WeaponClass):SetSkin(self.Skin)
end
[/lua]

[editline]28th February 2015[/editline]

Change the model path and weapon classes to match whatever weapons you need. Pointshop will show the right skin in the preview too using this method.