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