Im not sure if im cursed when it comes to networking or just bad at it. Anyways this time I have been trying to network an entity to client.
function SetSuspectInfo(ply,headshots,viewsnaps,wallkills)
net.Start( "SuspectShareData" )
net.WriteEntity(ply)
net.WriteInt(headshots,32)
net.WriteInt(viewsnaps,32)
net.WriteInt(wallkills,32)
net.Broadcast()
print(ply)
print(headshots)
print(viewsnaps)
print(wallkills)
end
-- client below
net.Receive( "SuspectShareData", function()
local ply = net.ReadEntity()
local headshots = net.ReadInt(32)
local viewsnaps = net.ReadInt(32)
local wallkills = net.ReadInt(32)
print(ply)
print(headshots)
print(viewsnaps)
print(wallkills)
end )
This returns the following.
Player [1][Leafdroid]
1
2
3
-- client below
[NULL Entity]
1
2
3
Why is the float valid but the entity isnt?