dobrograd-13-06-2022/garrysmod/addons/feature-gmpanel/lua/gmpanel/actions/move/server.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

9 lines
334 B
Lua

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)