Well, in order to do this, you would need several things. First you would need an inventory system. This would have to be made custom with derma and a table (or series of tables) that can be stored. I did much the same thing, albeit on a much smaller scale, with my weapon saving code. I got the table, converted it to a string, then saved it to a file specific to each player on my server.
Second, you would need items. These could be very specific or more general, depending on your preference. They would most likely need a real world equivalent entity for each one.
Third, you will need the weapons. I have not yet gotten to the point of making editable weapons, but I am sure it is possible. I cant think of a way to do it without having your own weapon inventory though. That wouldnt be too hard except that it would have to overwrite the standard HL2 weapon UI. You could have a table whos values are your weapons, and each of those is a table in itself, much like the default weapon setup. The only difference would be greater control over it.
The final step is a system that actually allows you to make the guns. The easiest way I would think would be to take the Borderlands route, having each part you can find give your weapon a specific quality, and use a clever algorithm to calculate what the end product would be when each weapon is made. I would think you would need some sort of secondary window to the inventory with open areas to drag weapon parts. Each gun would need core parts, and could be given optional parts. An action, trigger and barrel would be core parts, whereas sights, addons, and even stocks would be optional.
In fact, I might want to try this out myself…