D3stats/lua/d3stats/sv_network.lua

17 lines
415 B
Lua
Raw Permalink Normal View History

2020-01-22 14:25:58 +00:00
-- Copyright (c) 2020 David Vogel
--
-- This software is released under the MIT License.
-- https://opensource.org/licenses/MIT
util.AddNetworkString("D3stats_UpdateXP")
2016-10-05 12:30:35 +00:00
local meta = FindMetaTable("Player")
2016-10-05 12:30:35 +00:00
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)
net.Send(self)
2016-10-05 12:30:35 +00:00
end