How do I make guns "craftable" (as in: you collect stuff to make them)

I’m making a prison RP but to cut down on RDM I’m trying to make guns “craftable” so that you can’t just buy them from the current job, Prison Dealer.

Does anyone know how? Also I would accept any suggestions for jobs on this server.

It’s running my custom DarkRP 2.4.1 called JailRP with custom jobs and guns and stuff…

Please help if you can, thanks.

This might need scripting, refer with a person who knows scripting, more so, this is is a Lua question, so it should be in the Lua forum.

Im glad youre using my idea. It really will make rdm happen less but yes, you should hire a scripter.

“Hire” is a funny word :stuck_out_tongue: to people like me who don’t exactly want to spend more money than necessary.

No one is going to make you a crafting system without something in return.

I assumed that a crafting system was already made for download :smiley:

Good point.

First off, wrong section to be asking in, secondly, it needs to be scripted, so you’ll need to learn how to script, or hire someone to do it for you.

Then why are you asking for one?

Because I don’t magically know where everything is just because it’s uploaded in some dark corner of the internet… that’s like asking why you don’t know everything in every book ever…

There is a website called … it has literally thousands of files to download… half of them are backgrounds, adv dupes, and e2s, but I am sure you can find an addon that lets you craft guns, or at least a gamemode that uses “crafting” and then you can modify it

There you go Mr Donut, will need next to no modifying to work with guns, and I made it really easy to add more weapons, etc.

might?, this NEED Lua scripting

Thanks, I really appreciate the help!

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…