you dont "put" the items in the inventory. You just make an icon or whatever to represent it and in programming you would "store" the object by just hiding it i guess while inventory=1. Then to take it out say if keystate(whatever)=1 then inventory=0. Theres not really a set way to do this, youll kinda have to create your own way depending on the game and how you want it.
Video games…they can take you places unreachable, impossible, unfeasible. They put you in the book...they put you in the movie...they put you in a world, a world that before could only be imagined.