DerpRP Inv - Advanced DarkRP Inventory System

Upon retrospection, this mod has a few flaws. Namely:
“Limit” variables are not incremented.
Somethings (drugs) that have setup variables do not save over
People have trouble setting up new items

I am currently designing a new framework that will replace this. The basic look and feel will remain the same, but It should be more stable and easier to use. Feel free to modify this to meet your needs in the meantime.

I have no ETA on a release for this new Framework (It doesn’t even have a name)

What is this?
DerpRP Inventory is an advanced DarkRP Inventory that supports not only entities but also darkrp dropped weapons and shipments.

The number one, by far, thing I get requests for is this. People aren’t satisfied with something that holds ents or props. They want to keep their sweps and shipments and foods.

-Change-able items database with support for spawned_weapon and spawned_food.
-Items save over (duh, the main point)
-Admins can set max inventory size along with limits on a per item or per section basis.
-Integrated into gameplay smoothly (no binds), just hold alt+use to pickup and type “!inv” to access your inventory
-Works for DarkRP out of the box
-Has descriptions and names for items, allowing for a more integrated rp feel for things such as hungermod foods.

No picky, no clicky

How does I added moar items!
Adding more items is easy!

Just open up drpshared.lua and add your item in following the previous entries as an example. Here is an addition of the money printer:
–register your normal ents here
items = {
food = { – classname
name = “Chinese Food”, – Print name
desc = “Healthy chinese food, fills your whole hunger bar.”, – description
useable = true, --can they use it from the invenotry?
max = 0, --max that can be carried, 0 for infinate
model = “models/props_junk/garbage_takeoutcarton001a.mdl” – model
drug = { – classname
name = “Drugs”, – Print name
desc = “Duuuuuuuude this stuff makes you BUFF.”, – description
useable = true, --can they use it from the invenotry?
max = 0, --max that can be carried, 0 for infinate
model = “models/props_lab/jar01a.mdl” – model
money_printer = { – classname
name = “Money Printer”, – Print name
desc = “It prints money!”, – description
useable = false, --can they use it from the invenotry?
max = 2, --max that can be carried, 0 for infinate
model = “models/props_c17/consolebox01a.mdl” – model
} --commands on all closing brackets except the last one

Adding weapons is the same syntax. This example adds the hl2 pistol to the inventory, assuming you already added it to addentities.lua
–register your sweps here
weps = {
ls_sniper = {
name = “Silenced Sniper”, – Print name
desc = “How did you even get this?” – description
weapon_pistol = {
name = “Pistol”, – Print name
desc = “Useless gun from hl2” – description
} --commands on all closing brackets except the last one
Food is reserved for items from hungermod. To add more things to hungermod open up darkrp/gamemode/modules/HungerMod.lua and scroll to line 68. This example adds an edible baby:
AddFoodItem(“bottle2”, “models/props_junk/garbage_glassbottle002a.mdl”, 10)
AddFoodItem(“bottle3”, “models/props_junk/garbage_glassbottle003a.mdl”, 10)
AddFoodItem(“orange”, “models/props/cs_italy/orange.mdl”, 20)
AddFoodItem(“baby”, “models/props_c17/doll01.mdl”, 25)
Then open up drpshared.lua and register the food like so:
–register your foods
foodies = {
[“models/props_junk/garbage_glassbottle003a.mdl”] = { – model
name = “Dos Equis”, – Print name
desc = ““When it is raining, it is because he is sad.”” – description
[“models/props/cs_italy/orange.mdl”] = { – model
name = “Orange”, – Print name
desc = “An Orange a day keep der fuhror away.” – description
[“models/props_c17/doll01.mdl”] = { – model
name = “Baby”, – Print name
desc = “WHO SENT ALL THESE BABIES TO FITE ME.” – description
} --commands on all closing brackets except the last one

Remember, the food section is for items from hungermod only. If your food item is an actual sent it must go into items. I will add an option later to load sents into the food section.

What next?
Eventually I would like to create a trade system, and I would like to redo the current item system so that ents are stored in the same way that sweps,food, and shipments are stored.

To my fellow lua coders
This is my first release. I have been coding for at least 5 months now but due to issues that came up I have yet to release anything.

Therefore, I have no idea how well I code because I have had no feedback on it. So please look at my code and criticize me so that I can continue to improve.

Also, if anyone finds any bugs, please report them here.

Small update, forgot a AddCSLuaFile


Fantastic! This is what I have been waiting for in a half year. You just made GMod a lot better.
Thank you! :smile:

UHMHMH. weapon shipments to?


Wtf. It was banned


:frowning: banned it??!!

Sorry I jacked up the AddCSLuaFile part, its fixed now.


Looks fucking swish, good job man!

Wow this looks really good holy shit nice lua coding lol

This is great! Shit man love it! <3

Thanks for all the positive feedback. Let me know how it works for you guys.

Setting it up now, whats your Steam username? Then you can hop on my server when it’s done :slight_smile:

this is awesome but i request one thing… could you make it so you press f3 to open the menu and also the pocket would pickup the items with left click and right click would open the menu also?

No you can’t, the whole point of this is to remove the pocket.

My steam username is jakegadget.

And the purpose of this is alternative to the pocket. I believe they work well together. And I dislike the idea of needing ANOTHER swep.

Love it, next i think you may be able to do a new scoreboard.

that would be awesome

how about then just making it so you press f3 to open the inventory and normal use to pick it up.

HUD/Derma is my weakest point. I could try but I don’t see it happening anytime soon.

F3 is reserved in DarkRP for the gui clicker.
Normal use would conflict with actual use of items.

The idea is for it to be out of sight and out of mind, so you don’t feel forced to use it.

If you want to rebind your inventory open key the command is “drp_showinv”.

when i tried to add health and others to the items list it didnt work only when in the weapons list?

Great job,Keep up the good work! Will be using this on my RP server :smiley:

How did you add it? You have to have a sent first, and you have to add it in right. Show me what you did.

Lol @ win.

Didn’t realize how many people wanted this type of thing when Jake told me about it :stuck_out_tongue: