Persister - Save/Load System

Hi everyone, i built something for DarkRP that would be useful for concurrent players on servers

http://cloud-4.steampowered.com/ugc/23966391700822195/2A4AF756D1CEF86953D7B2CDB507C9CD0EC7716E/268x268.resizedimage[/t]

Persister it’s a script that saves simple player data between sessions, with persister you can save:

-Health/armor
-Weapons with the ammo quantity
-Position/Angle
-Job

[t]http://cloud-4.steampowered.com/ugc/23966391701042029/ED0EB90ED02F0CAB376E5DAC282839C4DB172101/637x358.resizedimage

This creates when the player disconnects, in the case that your gmod crashed, this also creates a backup each 5 minutes, but this delete the data when you die
After you initialy spawn, you can load this data, it’s cool i guess

Anyway, you can save the data writing “!save or /save” and erase (In the rare case that you want) "!erase or /erase"

Download it!: Workshop Link or Dropbox

You shouldn’t need to have 5 minute backups, because even if a player crashes GM:PlayerDisconnected should still be called.
Also in your code you named it “PlayerDisconnect” which is incorrect and finally I recommend using gameevents because they’re more reliable.

hum, i think that we discussed somewhere if PlayerDisconnected gets called when player disconnect (I thought that we ended with the hook not being called)
Okay, i’ll update it

The only problem: The weapons I set up for the player to have on spawn are stripped.

edit: and the fact that it breaks my game.

So… like Set/GetPData?

If the server crashes players would lose 100%of the progress they’ve made since they last logged on.