diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 20:43:26 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-21 20:43:26 -0400 |
| commit | 522cdfc0e24b45cf02d8c22cef85fa32408f1376 (patch) | |
| tree | 463ce70002a98847bdd6f6d78f479276cf92c684 /gamemode/core/database | |
| parent | 5e6e88f98300d4c3d41aad7cff5346539f4f9f66 (diff) | |
| download | artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.tar.gz artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.tar.bz2 artery-522cdfc0e24b45cf02d8c22cef85fa32408f1376.zip | |
Fixed a bug with server teleporters
Server teleports were not saveing to the database in the right format
Diffstat (limited to 'gamemode/core/database')
| -rw-r--r-- | gamemode/core/database/sv_setup.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gamemode/core/database/sv_setup.lua b/gamemode/core/database/sv_setup.lua index 6a7548d..6676735 100644 --- a/gamemode/core/database/sv_setup.lua +++ b/gamemode/core/database/sv_setup.lua @@ -67,7 +67,10 @@ function sql.GetPlayerData(ply) ply:ConCommand("connect " .. mtbl.lastserver) return end - ply:SetPos(mtbl.lastlocation) + local _,_,x,y,z = string.find(mtbl.lastlocation,"([-%d%.]+) ([-%d%.]+) ([-%d%.]+)") + local vec = {x,y,z} + for k,v in pairs(vec) do vec[k] = tonumber(v) end + ply:SetPos(Vector(unpack(vec))) q.deserialize_player(ply,plyd) end end @@ -88,6 +91,8 @@ function sql.CreatePlayerTable(ply) local plymet = data.newmeta() local plydata = util.TableToJSON(plytbl) local metdata = util.TableToJSON(plymet) + print("plydata", plydata) + print("metdata", metdata) local q_str = q.s_fmt(create_player_query,s64,plydata,metdata) local q_suc = function(res,li) --print("Inserted new player",ply) |
