forked from Nebual/NadmodPP
Fixes
This commit is contained in:
parent
dd9cb895c3
commit
91472cc258
@ -71,8 +71,8 @@ hook.Add("HUDPaint", "NADMOD.HUDPaint", function()
|
||||
local index = ent:EntIndex()
|
||||
local text
|
||||
local owner = NADMOD.GetPropOwner(ent)
|
||||
if owner and owner:isValid() then
|
||||
text = "Owner: " .. owner:Nick())
|
||||
if owner and owner:IsValid() then
|
||||
text = "Owner: " .. owner:Nick()
|
||||
else
|
||||
text = "Owner: N/A"
|
||||
end
|
||||
|
@ -90,11 +90,11 @@ function NADMOD.PPInitPlayer(ply)
|
||||
end
|
||||
end
|
||||
net.Start("nadmod_propowners")
|
||||
net.WriteUInt(table.Count(NADMOD.Props),16)
|
||||
for k,v in pairs(NADMOD.Props) do
|
||||
net.WriteUInt(k,16)
|
||||
net.WriteString(v.SteamID)
|
||||
end
|
||||
net.WriteUInt(0,16)
|
||||
net.Send(ply)
|
||||
end
|
||||
hook.Add("PlayerInitialSpawn", "NADMOD.PPInitPlayer", NADMOD.PPInitPlayer)
|
||||
@ -113,21 +113,21 @@ hook.Add("PlayerSpawn", "NADMOD.PPOwnWeapons", NADMOD.PPOwnWeapons)
|
||||
function NADMOD.RefreshOwners()
|
||||
if timer.Exists("NADMOD.RefreshOwners") then return end
|
||||
timer.Create("NADMOD.RefreshOwners", 1, 0, function()
|
||||
if next(NADMOD.PropOwnersSmall) then
|
||||
net.Start("nadmod_propowners")
|
||||
local i = 1
|
||||
if next(NADMOD.PropOwnersSmall) then
|
||||
net.Start("nadmod_propowners")
|
||||
local i = 1
|
||||
for k,v in pairs(NADMOD.PropOwnersSmall) do
|
||||
net.WriteUInt(k,16)
|
||||
net.WriteString(v)
|
||||
NADMOD.PropOwnersSmall[k] = nil
|
||||
i = i + 1
|
||||
if i==1000 then break end
|
||||
NADMOD.PropOwnersSmall[k] = nil
|
||||
i = i + 1
|
||||
if i==1000 then break end
|
||||
end
|
||||
net.WriteUInt(0,16)
|
||||
net.Broadcast()
|
||||
net.WriteUInt(0,16)
|
||||
net.Broadcast()
|
||||
else
|
||||
timer.Remove("NADMOD.RefreshOwners")
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user