Garry's Mod

Garry's Mod

[DarkRP] Keep pocket contents when disconnecting
124 Comments
Hexon_Boi 14 Jun, 2024 @ 5:27pm 
can u add a convar that makes perma pockets save contents for separate jobs? So when im like medic i can store medkits but when i change to other job i have another set of items in my pocket
Cédric GÉRILLE [GiletJaune]  [author] 28 Jul, 2018 @ 3:28am 
If it's in your pocket when you leave then I suppose it will still be there when you come back.
☝Пошел на ♥♥♥ 28 Jul, 2018 @ 12:38am 
Say in Russian , if i exit server and join again my money printer will save?
Cédric GÉRILLE [GiletJaune]  [author] 15 Jul, 2018 @ 6:45am 
You just told me you can't subscribe to the DarkRP on the Workshop. Deal with it but honestly it's not so much of a problem of mine. :steammocking:
Quotation Marx 15 Jul, 2018 @ 5:11am 
Surely there's a Steam workshop link? I'm just unhealthily paranoid about viruses.
Cédric GÉRILLE [GiletJaune]  [author] 15 Jul, 2018 @ 4:03am 
Just add it on your game / server by downloading it through its Git repository (or the Subversion compatibility layer if you prefer instead).
Home page: https://github.com/FPtje/DarkRP/
Quotation Marx 15 Jul, 2018 @ 3:50am 
How do you even download the Darkrp gamemode? It says that I can't access it if I click on it & therefore I can't subscribe to it
Bolsonaro 28 Jan, 2018 @ 3:37pm 
cance :steamhappy:
Cédric GÉRILLE [GiletJaune]  [author] 24 Dec, 2017 @ 4:50am 
Of course not, because everything can be spawned from the spawn menu with no limit.
tourniquet taster 23 Dec, 2017 @ 7:48pm 
IS THERe SOMETHING LIKE THis in ssandbox?\
robalek69 3 Sep, 2017 @ 6:56am 
I hope i have pasted it correct xD
Cédric GÉRILLE [GiletJaune]  [author] 29 Jul, 2017 @ 5:25pm 
Well, I do not think I have done something serious in my last updates...
I use the method Player:SetPData() [wiki.garrysmod.com], which means that saved pockets are stored in the server's sv.db (which is an SQLite database).

The problems you mention seem to be something related to some bad SQL requests from your addons, or worse (backdoor, etc.).

I do not use my own table in the database (which is not really smart), so any kind of cleanup requires some work to make. I have not done a cleanup feature, so that's for sure the full cleanup does not come from my code. Nevertheless, if your pocket is empty when you disconnect then your saved pocket will actually be removed from database rather than saving an empty (and useless) pocket list.
Soma 29 Jul, 2017 @ 1:51pm 
Just curious, my pockets will randomly lose everything when I reconnect. It's strange, because since my last comment, it's worked fine 90% of the time. Randomly it erases everyones pockets when we start up the server though, every once in awhile.

I'm assuming it has to do with the assorted random addons I've been incorporating into my server, (durgz mod, alchemy mod, vapes, etc.) but I can't seem to pinpoint which one is the cause. I'm sure it's one of my addons, but I was just wondering if you had any ideas as to why this would be happening.
Cédric GÉRILLE [GiletJaune]  [author] 2 Jun, 2017 @ 1:50am 
:steamhappy:
Soma 1 Jun, 2017 @ 11:30pm 
Ah ok. I may have 3000+ hrs in Gmod, but I'm only now learning DarkRP. Thanks for your help, the addon works great! :)
Cédric GÉRILLE [GiletJaune]  [author] 1 Jun, 2017 @ 9:53pm 
You just open it with your favorite text editor. xD Those files are just a list of ConVars with their values.
Soma 1 Jun, 2017 @ 9:47pm 
If i can do it through the console, then nevermind. No need for the arbitrary file problems. xD
Soma 1 Jun, 2017 @ 9:46pm 
But how do you open the server.cfg? It isn't recognized by Notepad, so how am i supposed to add code to it if i have no way of reading it's contents?
Cédric GÉRILLE [GiletJaune]  [author] 1 Jun, 2017 @ 9:41pm 
Either you type them in console or you put them in cfg/server.cfg, very simple isn't it?
Soma 1 Jun, 2017 @ 9:26pm 
Um, how do I add the console variable? Can you please help me?
Cédric GÉRILLE [GiletJaune]  [author] 6 May, 2017 @ 6:25am 
I do not know. :steamsad:
Chisma 6 May, 2017 @ 6:24am 
Okay, but in what file I put it, I'm not sure
Cédric GÉRILLE [GiletJaune]  [author] 6 May, 2017 @ 6:21am 
This addon is meant to save and restore the content of the default pocket. :steamsad:
Chisma 6 May, 2017 @ 6:05am 
I've done it but nothing happens, the default pocket is set
Cédric GÉRILLE [GiletJaune]  [author] 6 May, 2017 @ 5:27am 
Usually by adding it to your server's collection!
Chisma 6 May, 2017 @ 4:35am 
How can I install it?
Cédric GÉRILLE [GiletJaune]  [author] 26 Mar, 2017 @ 8:53am 
Well, it's complicated, otherwise I would have fixed it already.
Basically you can remove the filter. The problem is that you have several fields that do not contain something that can be stored (especially entities). You need to find a way to make them storeable in database.
M0NstR. 26 Mar, 2017 @ 8:44am 
how can i fix this, if possible?
Cédric GÉRILLE [GiletJaune]  [author] 26 Mar, 2017 @ 8:02am 
It's because restoring entities does not restore every field.
I filtered saved data to avoid storing a big bunch of useless information.
And obviously that does not work well for every entity type.
M0NstR. 26 Mar, 2017 @ 7:14am 
Hi! Please, can you tell me, why weapons save in inventory, but after reconnect, it is props, I can't take it. (sry for my bad english)
zzz 14 Jan, 2017 @ 1:15pm 
cool
Dalek101 8 Jan, 2017 @ 12:26pm 
well i think the addon version is deleted but i cant make a steamcmd or anything else cos i try and try again but it never works
Cédric GÉRILLE [GiletJaune]  [author] 8 Jan, 2017 @ 9:54am 
You want the DarkRP as an addon? Is that the question?
Dalek101 8 Jan, 2017 @ 8:54am 
how do i get the actual darkRP addon for the gamemode?
Husky Chocolate 20 Dec, 2016 @ 2:44pm 
As a Fan of your addon, i believe you have the will and capability to accomplish all you have to do. good luck sir.
Cédric GÉRILLE [GiletJaune]  [author] 20 Dec, 2016 @ 2:31pm 
LOL, but I have so much to do...
Husky Chocolate 20 Dec, 2016 @ 2:21pm 
Sir, The potential is here, the only thing stunting your achievment is your Atitude.
Cédric GÉRILLE [GiletJaune]  [author] 20 Dec, 2016 @ 8:22am 
My brain cannot achieve such an improvement.
Husky Chocolate 19 Dec, 2016 @ 10:58pm 
you can buff it by reducing all shipments with items above 10 to 10 upon server entry
Cédric GÉRILLE [GiletJaune]  [author] 19 Dec, 2016 @ 10:35pm 
Because it's a dangerous feature.
Husky Chocolate 19 Dec, 2016 @ 9:03pm 
Why No Save?
Cédric GÉRILLE [GiletJaune]  [author] 16 Dec, 2016 @ 10:05am 
Bah, c'est la poche habituelle du DarkRP.
Yoru Wakusei 16 Dec, 2016 @ 6:51am 
je trouve pas le pocket
Cédric GÉRILLE [GiletJaune]  [author] 13 Dec, 2016 @ 8:17am 
That is true, shipment information is not saved yet.
Husky Chocolate 13 Dec, 2016 @ 12:18am 
Shipments are broken after loging back in, no model/descripting just a crate, hit 'e' on it and it disappears, 10 weapons gone.
Cédric GÉRILLE [GiletJaune]  [author] 9 Dec, 2016 @ 1:44pm 
If you enable darkrp_keep_pocket_forever, almost everything is concerned.
A big remake is needed to restore every field of entities.
76561198116800015 9 Dec, 2016 @ 1:40pm 
What exactly? Im going to use pocket as inventory
Cédric GÉRILLE [GiletJaune]  [author] 9 Dec, 2016 @ 1:38pm 
I think so, but it is still as buggy as it was. xD
76561198116800015 9 Dec, 2016 @ 1:36pm 
still working?
Cédric GÉRILLE [GiletJaune]  [author] 15 Nov, 2016 @ 8:11am 
Nevermind, this addon is kind of outdated.