Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zoom =
- {
- canHide = false
- };
- registerWidget("Zoom");
- function Zoom:draw()
- local player = getPlayer();
- if player == nil then return end;
- -- Put your ZOOM fov here --
- local zoomFov = 50
- -- Divide Sensitivity by this amount so, m_speed 4 / 2 = 2, new m_speed 2 --
- local zoomSensDivision = 1.5
- -- Put your REGULAR fov here --
- local Fov = 110
- -- Put what key you want it bound to here! must be in Quotes --
- local zoomKey = "mouse2"
- -- editor => no crosshair
- if player.state == PLAYER_STATE_INGAME or player.state == PLAYER_STATE_SPECTATOR then
- if consoleGetVariable("r_fov") < Fov then
- local mspeed = consoleGetVariable("m_speed");
- if(mspeed < mspeed * zoomSensDivision) then
- consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. Fov ..
- ";m_speed " .. (consoleGetVariable("m_speed") * zoomSensDivision));
- else
- consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. Fov );
- end
- else
- consolePerformCommand("bind game " .. zoomKey .. " r_fov " .. zoomFov ..
- ";m_speed " .. (consoleGetVariable("m_speed") / zoomSensDivision));
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement