forked from Dadido3/D3stats
Refactor, Beatify and EndRound hook fix
parent
0877e8a03d
commit
777ffcacbd
@ -1,4 +1,4 @@
|
|||||||
if (SERVER) then
|
if SERVER then
|
||||||
include("d3stats/init.lua")
|
include("d3stats/init.lua")
|
||||||
else
|
else
|
||||||
include("d3stats/cl_init.lua")
|
include("d3stats/cl_init.lua")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
net.Receive( "D3Stats_UpdateXP", function()
|
net.Receive("D3stats_UpdateXP", function()
|
||||||
local XP = net.ReadUInt(32)
|
local XP = net.ReadUInt(32)
|
||||||
|
|
||||||
--print("XP update: " .. tostring(XP))
|
--print("XP update: " .. tostring(XP))
|
||||||
|
|
||||||
if d3stats and d3stats.D3StatsOverlay then
|
if D3stats and D3stats.D3statsOverlay then
|
||||||
d3stats.D3StatsOverlay:StatsUpdate( XP, d3stats.CalculateLevel( XP ) )
|
D3stats.D3statsOverlay:StatsUpdate(XP, D3stats.CalculateLevel(XP))
|
||||||
end
|
end
|
||||||
end)
|
end)
|
@ -1,7 +1,7 @@
|
|||||||
if SERVER then
|
if SERVER then
|
||||||
|
|
||||||
concommand.Add( "d3stats_clearall", function( ply, cmd, args )
|
concommand.Add("D3stats_clearall", function(ply, cmd, args, argsString)
|
||||||
print( "What the hell are you doing?" )
|
print("What the hell are you doing? Not implemented yet!")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
@ -1,11 +1,11 @@
|
|||||||
util.AddNetworkString( "D3Stats_UpdateXP" )
|
util.AddNetworkString("D3stats_UpdateXP")
|
||||||
|
|
||||||
local meta = FindMetaTable("Player")
|
local meta = FindMetaTable("Player")
|
||||||
if not meta then return end
|
if not meta then return end
|
||||||
|
|
||||||
-- Send the XP of this (self) player to itself
|
-- Send the XP of this (self) player to itself
|
||||||
function meta:D3Stats_Net_UpdateXP()
|
function meta:D3stats_Net_UpdateXP()
|
||||||
net.Start( "D3Stats_UpdateXP" )
|
net.Start("D3stats_UpdateXP")
|
||||||
net.WriteUInt( self:D3Stats_GetXP(), 32 )
|
net.WriteUInt(self:D3stats_GetXP(), 32)
|
||||||
net.Send(self)
|
net.Send(self)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue