Recently I founded this code and added this script in my mouse.
Code:
function OnEvent(event, arg)
OutputLogMessage("event = %s, arg = %d\n", event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "PROFILE_DEACTIVATED" then
ReleaseMouseButton(2) -- to prevent it from being stuck on
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
recoil = not recoil
spot = not spot
end
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then
if recoil then
repeat
--Sleep(35)
Sleep(8)
MoveMouseRelative(0, 2)
until not IsMouseButtonPressed(1)
end
end
end
This code manage to control all type of AR and SMG recoil while tap or spray with normal scope, dot scope, and holographic.
But I wasn't able to make 4x scope and 8x scope's recoil steady. Can someone help me out with this and I am trying to make it when I press a certain key it will switch between all type of scope recoil.