aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/animation/sv_animate.lua
blob: 24d0ed08a2f7810fddd1ef9fdcd8d6b32e7348b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
nrequire("sh_animations.lua")

local meta = FindMetaTable("Player")

util.AddNetworkString("art_start_animation")
util.AddNetworkString("art_stop_animation")

function meta:StartAnimation(name)
	net.Start("art_start_animation")
	net.WriteEntity(self)
	net.WriteString(name)
	net.Broadcast()
end

function meta:StopAnimation(name)
	net.Start("art_stop_animation")
	net.WriteEntity(self)
	net.WriteString(name)
	net.Broadcast()
end