Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hook = hook;
- local Angle = Angle;
- local math = math;
- local fa;
- hook.Add("CalcView", "", function(p, o, a, f)
- local view = {};
- view.fov = f;
- view.angles = fa;
- view.origin = o;
- return view;
- end);
- hook.Add("CreateMove", "", function(ucmd)
- if(!fa) then fa = ucmd:GetViewAngles(); end
- fa = (fa + Angle(ucmd:GetMouseY() * .023, ucmd:GetMouseX() * -.023, 0));
- fa.p, fa.y, fa.x = math.Clamp(fa.p, -89, 89), math.NormalizeAngle(fa.y), math.NormalizeAngle(fa.x);
- ucmd:SetViewAngles(fa);
- end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement