diff options
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) |
