D3stats/lua/d3stats/cl_network.lua

29 lines
766 B
Lua
Raw Normal View History

2016-10-05 12:30:35 +00:00
net.Receive( "D3Stats_UpdateXP", function()
local XP = net.ReadUInt( 32 )
--print( "XP update: " .. tostring(XP))
if d3stats and d3stats.D3StatsOverlay then
d3stats.D3StatsOverlay:StatsUpdate( XP, d3stats.CalculateLevel( XP ) )
end
end )
net.Receive( "D3Stats_UpdateLevels", function()
local players = net.ReadUInt( 16 )
for i = 1, players do
local ply = net.ReadEntity()
local Level = net.ReadUInt( 16 )
ply.D3Stats_Level = Level
--print( "Level update: " .. tostring(ply) .." --> " .. tostring(Level))
end
end )
net.Receive( "D3Stats_BroadcastLevel", function()
local ply = net.ReadEntity()
local Level = net.ReadUInt( 16 )
ply.D3Stats_Level = Level
--print( "Level broadcast: " .. tostring(ply) .." --> " .. tostring(Level))
end )