DInventory - A Roleplay Inventory

What is this?
DInventory is an advanced DarkRP Inventory, And it’s easy to add items!

How do I add an item?
It’s pretty simple, you’re going to want to go into rp_inventory_items.lua, and here’s the format.


RPI:RegisterItem("weapon_pistol", "9mm Pistol", "A simple pistol.", "Weapons", Model("models/weapons/w_pistol.mdl"))

Screenshots

http://puu.sh/2FfMJ.jpg

I want to add things other than weapons, How do I do that?
I’ve already put in another example you can see in the rp_inventory_items.lua, Here’s the format.


RPI:RegisterItem("drug", "Drug", "Gets you high.", "Consumables", Model("models/props_lab/jar01a.mdl"))


Bugs
If you’ve found a bug please contact me via PM or post it on this thread.

How do I Install this?
*It’s pretty simple, It’s not an addon though. Drag the files in Darkrp > gamemode.

  1. Go into the init.lua (darkrp > gamemode > init.lua) then put this where the all the other AddCSLuaFiles are
    AddCSLuaFile(“rp_inventory.lua”)
    AddCSLuaFile(“rp_inventory_items.lua”)
    Then, Scroll down until you find where all the includes are and put this -
    include(“rp_inventory.lua”)
    include(“rp_inventory_items.lua”)
    DO THE SAME IN THE CL_INIT.LUA*

How do I pick up items?
On default it’s set to ALT + E

Download
http://up.ht/17eIhYd

-snip-

DarkRP > Gamemode

hey Dannyman, Does this inventory save items? Almost like DerpInv??? If it does thanks if not, maybe consider it? :3

It does save items.

awesome, thank you soo much, i really love all your lua work and i would really love if you would add me on steam (ik you probably get that alot) and i’m not going to ask any stupid requests or anything i just wanna chill some time, thanks sooo much, again :slight_smile:

P.s. - Ill private message yu mah steam if yu dont mind :slight_smile:
P.s.s. - Is there any chance you would be making a npc “garage” that stores cars? :slight_smile: just wondering thanks.

Thanks, I don’t plan on making a NPC soon.

I was always dispointed that DarkRP never had a inventory. Especially when the project was taken over and new stuff started to be added and changed.

It’s one of the things that were missing, makes a big difference.

I have a problem.
I got everything to work you can put item’s into your inventory using alt + e.
But when you press F2 it will not open the inventory.
I Added the lines
[LUA]AddCSLuaFile(“rp_inventory.lua”)
AddCSLuaFile(“rp_inventory_items.lua”)

include(“rp_inventory.lua”)
include(“rp_inventory_items.lua”)
[/LUA]
To the Darkrp > Gamemode > Init.lua file where they should go.
What am i doing wrong?

Type rp_inventory in console, does that work?

Menu doesn’t even open. :stuck_out_tongue:

edit: I even tried doing the /inv or !inv command along with the console command. It’s just not opening.

Did you do the includes and AddCSLuaFile?

Read what I said, console command doesn’t work either.

Edited the post, didn’t see.

What did you edit?

The post of when I was talking to KoZ

Oh ok, But the rp_inventory doesn’t work either no error’s in console or anything.

Also, put both includes in the cl_init.lua then try.

[editline]22nd April 2013[/editline]

Just tested that out and it fixes it,

[editline]22nd April 2013[/editline]

Both includes and AddCSLuaFile should go in the cl_init also.

The menu now opens but the storing function with alt + e doesn’t work