dobrograd-13-06-2022/garrysmod/addons/feature-gmpanel/lua/gmpanel/actions/move/server.lua

10 lines
334 B
Lua
Raw Normal View History

2023-11-16 15:01:19 +05:00
gmpanel.registerAction('move', function(obj, ply)
if not (isvector(obj.pos) and isangle(obj.ang)) then return end
local players = gmpanel.buildTargets(obj.players or {})
for _, target in ipairs(players) do
target:SetPos(obj.pos)
target:SetEyeAngles(obj.ang)
hook.Run('gmpanel.moved', ply, target, obj.pos, obj.ang)
end
end)