|
|
-- 轻微30发压枪 可切换宏
local aimstate = false
local pressed = false
--侧键MB4切换开关
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then
aimstate = not aimstate
OutputLogMessage("压枪状态:"..tostring(aimstate).."\n")
end
--左键按下启动压枪
if (event == "MOUSE_BUTTON_PRESSED" and arg == 1) then
pressed = true
end
if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then
pressed = false
end
--压枪主循环
if aimstate and pressed then
MoveMouseRelative(0,5) --Y=5轻微下压
Sleep(40) --间隔长,压枪频率低
end
end |
|