The simplest question ever,why do poeple lose there items when they disconnect?

I feel really stupid to ask this,because I feel like it is SOOO simple.
However I’ve searched everywhere but if I put a tag in on google,wrong thing,not really any tags,wrong thing.

How do I make sure people do not lose there items in pocket on disconnect?

They lose their items because their items are likely saved as a table on the player object which gets destroyed when they disconnect. To save the items you would have to write the contents of their pocket to a txt file or a database.

Or as PData, if you don’t want to muck about with how you save stuff.

This is probably the best route (it’s just a simplified way to query the server’s SQL database anyway). Use ply:SetPData and util.TableToJSON to save the contents of the pocket, and use the opposites (ply:GetPData and util.JSONToTable) to get the table back and set the player’s inventory to the saved table whenever they join (hook into PlayerInitialSpawn). Check the GMod Wiki for documentation on how to use them.

Alright,I am very confused,is there a way to do this simply?
Like what files am I supposed to change,create or delete ect.
Is there just a addon/plugin that does this?

Well I’m sure there are inventory systems that do this (and more) out there, both paid and free. I’d suggest taking a look at those. Doing what I said above is amazingly simple, and probably would take less than 40 lines of code to do so. You shouldn’t need to change any files, just add a new script in autorun/server that does what I just mentioned. Note that all you need to know about the DarkRP side of it is in the sv_init.lua for the pocket SWEP.

Well,I got a the DarkRP Advanced Inventory Addon,HOWEVER,I have no idea how to use it.

That’s the paid one, correct? Unless you post the code (which you can’t do as this is a paid addon) or someone else has experience with it, I can’t help you out. My guess, as this is how most addons from SF come, is to put the folder with the addon name and sub-directories(lua, materials, sound, etc.) into your addons folder. There may be config too, but I can’t tell you for sure without access to the files. However, If you actually bought the advanced inventory addon off of Scriptfodder, then you can ask the developer of the addon for support. From looking at the addon page, there is a readme.txt file included with it that should explain it. If you got it off of LeakForums, then good luck getting it to work correctly.