Grabbing Server Time in Lua
Since apparently nobody is grabbing servertime correctly I figured I'd post a way to get it properly.
Code:
local properCurTime = 0
hook.Add("Move", "GrabServerTime", function()
if ( IsFirstTimePredicted() ) then
properCurTime = CurTime() + engine.TickInterval()
end
end)
According to NanoCat the one on his pastebin wasn't recovered properly, the one that Kelse's pastebin is off by a tick.