diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 17:52:42 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 17:52:42 -0400 |
| commit | 5e6e88f98300d4c3d41aad7cff5346539f4f9f66 (patch) | |
| tree | bc5de00f63a8b1d5226b0c2988fcdaa06f6e2f13 /gamemode/core/mapstich/sv_mapstich.lua | |
| parent | 978909d830dd173f8b018f36c5f142d225732ba1 (diff) | |
| download | artery-5e6e88f98300d4c3d41aad7cff5346539f4f9f66.tar.gz artery-5e6e88f98300d4c3d41aad7cff5346539f4f9f66.tar.bz2 artery-5e6e88f98300d4c3d41aad7cff5346539f4f9f66.zip | |
Fixed loading bug
Fixed a bug where the equipment inventory would not load correctly.
Diffstat (limited to 'gamemode/core/mapstich/sv_mapstich.lua')
| -rw-r--r-- | gamemode/core/mapstich/sv_mapstich.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua index 93f8667..121c0c9 100644 --- a/gamemode/core/mapstich/sv_mapstich.lua +++ b/gamemode/core/mapstich/sv_mapstich.lua @@ -19,7 +19,7 @@ local function SavePlayerData(ply) query = q.s_fmt(query,pdat,ply:SteamID64()) else query = [[ - UPDATE playerdata SET PlayerData='%s' MetaData='%s' WHERE SteamID=%.0f + UPDATE playerdata SET PlayerData='%s', MetaData='%s' WHERE SteamID=%.0f ]] local pmet = util.TableToJSON({ lastserver = game.GetIPAddress(), @@ -36,6 +36,10 @@ local function SavePlayerData(ply) end) end +concommand.Add("artery_saveplayer",function(ply,cmd,args) + SavePlayerData(ply) +end) + net.Receive("art_zonechange",function(len,ply) timer.Simple(0.5,function() @@ -68,3 +72,7 @@ net.Receive("art_zonechange",function(len,ply) end end) end) + +hook.Add("PlayerDisconnected","save_data_on_disconnect",function(ply) + SavePlayerData(ply) +end) |
