Wait until serverside is done loading before running clientside

This commit is contained in:
Logan G 2021-12-16 00:04:38 -07:00
parent a03933a81e
commit eeb2baaac6
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -35,9 +35,6 @@ if player() == owner() then
net.writeStream(config) net.writeStream(config)
net.send() net.send()
net.start("LSFT-Get-Config")
net.writeString("hello there!")
net.send()
net.receive("LSFT-Config-Write", function(data) net.receive("LSFT-Config-Write", function(data)
print("Got net message to write config, waiting for stream...") print("Got net message to write config, waiting for stream...")
@ -46,5 +43,27 @@ if player() == owner() then
file.write("lsftconf.txt", data) file.write("lsftconf.txt", data)
end) end)
end) end)
end
--[[
net.receive("LSFT-Get-Config-Resp-Test", function()
print(unpack(net.readTable()))
print(unpack(net.readTable()))
end)
--]]
end
net.receive("LSFT-Loaded", function()
dodir("lsft/modules/client")
dodir("lsft/modules/shared")
--[[
if player() == owner() then
net.start("LSFT-Get-Config")
net.writeString("LSFT-Get-Config-Resp-Test")
net.writeTable({"core","command_prefix"})
net.writeTable({"spectate","controls","forward"})
net.writeTable({})
net.send()
end
--]]
end)