mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-16 05:57:35 +00:00
fix broken time session
This commit is contained in:
parent
60794972eb
commit
5f76915d7c
|
@ -5,7 +5,7 @@ if game.SinglePlayer() then return end
|
||||||
//
|
//
|
||||||
|
|
||||||
gmInte = {}
|
gmInte = {}
|
||||||
gmInte.version = "0.1.9"
|
gmInte.version = "0.2.0"
|
||||||
gmInte.config = {
|
gmInte.config = {
|
||||||
["redownloadMaterials"] = false,
|
["redownloadMaterials"] = false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ function gmInte.playerDisconnected(ply)
|
||||||
["deaths"] = ply:Deaths() || 0,
|
["deaths"] = ply:Deaths() || 0,
|
||||||
["customValues"] = getCustomValues(ply),
|
["customValues"] = getCustomValues(ply),
|
||||||
["rank"] = ply:GetUserGroup() || "user",
|
["rank"] = ply:GetUserGroup() || "user",
|
||||||
["time"] = os.difftime(os.time(), ply.gmIntTimeConnect) || 0,
|
["time"] = math.Round(RealTime() - ply.gmIntTimeConnect) || 0,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,8 +33,7 @@ end
|
||||||
local netFuncs = {
|
local netFuncs = {
|
||||||
[0] = function(ply)
|
[0] = function(ply)
|
||||||
gmInte.userFinishConnect(ply)
|
gmInte.userFinishConnect(ply)
|
||||||
// set gmInteTime to acual time
|
ply.gmIntTimeConnect = math.Round(RealTime())
|
||||||
ply.gmIntTimeConnect = os.time()
|
|
||||||
end,
|
end,
|
||||||
[1] = function(ply, data)
|
[1] = function(ply, data)
|
||||||
gmInte.testConnection(ply, data)
|
gmInte.testConnection(ply, data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user