blob: 126c616acb222d7927c197b65a39261c591a3a92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
if (SERVER) then
util.AddNetworkString("LoadEntity_WS")
net.Receive("LoadEntity_WS",function(siz,pl)
local Ab = net.ReadEntity()
if (Ab:IsPlayer()) then
Ab:UpdateSelection(pl)
--pl:UpdateStream(Ab)
end
end)
else
local Q = 0
function GM:NetworkEntityCreated(ent)
Q=Q+1
timer.Simple(math.Rand(0.1,0.2)*Q,function()
net.Start("LoadEntity_WS") net.WriteEntity(ent) net.SendToServer()
Q=Q-1
end)
end
end
|