Advertisement
aliasedfrog

Reflex Zoom First Iteration

May 4th, 2015
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Zoom =
  2. {
  3. canHide = false
  4. };
  5. registerWidget("Zoom");
  6. function Zoom:draw()
  7.  
  8. local player = getPlayer();
  9. if player == nil then return end;
  10.  
  11. -- Put your ZOOM fov here --
  12. local zoomFov = 50
  13. -- Divide Sensitivity by this amount so, m_speed 4 / 2 = 2, new m_speed 2 --
  14. local zoomSensDivision = 1.5
  15. -- Put your REGULAR fov here --
  16. local Fov = 110
  17. -- Put what key you want it bound to here! must be in Quotes --
  18. local zoomKey = "mouse2"
  19.  
  20. -- editor => no crosshair
  21. if player.state == PLAYER_STATE_INGAME or player.state == PLAYER_STATE_SPECTATOR then
  22. if consoleGetVariable("r_fov") < Fov then
  23.  
  24. local mspeed = consoleGetVariable("m_speed");
  25. if(mspeed < mspeed * zoomSensDivision) then
  26. consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. Fov ..
  27. ";m_speed " .. (consoleGetVariable("m_speed") * zoomSensDivision));
  28. else
  29. consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. Fov );
  30. end
  31. else
  32. consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. zoomFov ..
  33. ";m_speed " .. (consoleGetVariable("m_speed") / zoomSensDivision));
  34. end
  35. end
  36.  
  37.  
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement