Need Help Creating Inventory for gamemode!

Hey !

Trying to learn Lua Coding, so i’m practicing by creating my own gamemode similar to DarkRP. The problem that i have is this: I don’t have any idea how to create inventory for players.

I want players to be able to purchase weapons or drugs and save them in their inventory. Been reading around and i cant find anything to help me get going? Anyone know have a piece of code that works or a tutorial or a way for me to figure out how to get this inventory going?

Could you show us what you’ve got already?
i mean a part of what you’ve been trying to create, not your whole gamemode ofc. :smile:

How much do you know about lua?

Do you know about variables, tables, loops, creating functions?
No ones going to just “give” you a system.

See the thing is, i’m really new. I’ve done java coding in school, so i know the basics of variables tables, loops, creating functions. I understand that lua is a different language. I’ve looked at classes and lua documentations, and i have no clue how i can start a function, or how an inventory system would actually work. Like how would i save each item to a player? That’s where i’m stumped. So i have no code that i’ve started with. Jump hoping someone would know where i can get a jump start.

Also i’m not asking for a system. I’m asking for ways of learning how inventory saving works, or where i could start looking.

If you guys have anything for me, that would be great

I’m understanding lua as i read more and more about it. Garry’s recent change to Gmod 13 wasn’t really a help but its all good :slight_smile:

Start here and keep going.