mirror of
https://github.com/sr229/metastruct-experiments.git
synced 2024-09-20 06:30:36 +00:00
use think hook on server
This commit is contained in:
parent
e4180140b4
commit
18ce360176
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ if SERVER then
|
||||||
local prevName = ""
|
local prevName = ""
|
||||||
local prevSTime = ""
|
local prevSTime = ""
|
||||||
|
|
||||||
hook.add("tick", "serverTimeTick", function()
|
hook.add("think", "serverTimeTick", function()
|
||||||
if prevSTime ~= os.date() then
|
if prevSTime ~= os.date() then
|
||||||
prevSTime = os.date()
|
prevSTime = os.date()
|
||||||
net.start("serverTime")
|
net.start("serverTime")
|
||||||
|
@ -67,7 +67,7 @@ if SERVER then
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- METASTRUCT SPECIFIC HOOK
|
-- METASTRUCT SPECIFIC HOOK
|
||||||
hook.add("tick", "e621", function()
|
hook.add("think", "e621", function()
|
||||||
if prevName ~= game.getHostname() then
|
if prevName ~= game.getHostname() then
|
||||||
prevName = game.getHostname()
|
prevName = game.getHostname()
|
||||||
net.start("serverName")
|
net.start("serverName")
|
||||||
|
|
Loading…
Reference in a new issue