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.
Why...?
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.
Features?
-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
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:--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 }
Then open up drpshared.lua and register the food like so:--[[...]]-- 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)
--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.
Download
v1.01
Small update, forgot a AddCSLuaFile

Register
Events
Popular
More
Post #1




x 24
x 14
x 8
x 2
x 1
x 1
x 1
x 1
x 1
x 1









