blob: 40ae1b101f5f6296e83134eade43842aa907d0fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
---A way to apply effects on players.
-- Also see cl_effects.lua
--@server sv_effects.lua
--@alias ed
local ed = {}
---Apply an effect to the player.
-- Send a message to a player, saying they should have an effects
--@tparam player ply The player to apply the effect to
--@tparam string name The name of the effect to apply
--@tparam string data Data to send for the effect (can be "")
function ed.SendEffect(ply,name,data)
net.Start("art_clienteffect")
local dlen = #data
net.WriteString(name)
net.WriteUInt(dlen,32)
net.WriteData(data,dlen)
net.Send(ply)
end
return ed
|