Posted: Tue Jan 06, 2015 4:03 am Post subject: use mouse click as hotkey
hi. i want to use left mouse click as hotkey for speed hack. i want to be enable speed hack only when the click is paressde. when i release the click speed hack is desable. how can i do this? i know sonethig about lua but don`t enough for do this by myself
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
Posted: Tue Jan 06, 2015 4:19 am Post subject:
Code:
wantedSpeed=10
lastSpeed=1
function checkKeys(timer)
if isKeyPressed(VK_LBUTTON) then
if lastSpeed==1 then
speedhack_setSpeed(wantedSpeed)
lastSpeed=wantedSpeed
end
else
if lastSpeed~=1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
function checkKeys(timer)
if isKeyPressed(VK_LBUTTON) then
if lastSpeed==1 then
speedhack_setSpeed(wantedSpeed)
lastSpeed=wantedSpeed
end
else
if lastSpeed~=1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
wonderful script! I've been using this with a bit of modification to suit my need for fps game as follow:
wantedSpeed=0.3
lastSpeed=1
function checkKeys(timer)
if isKeyPressed(VK_RBUTTON) then
if lastSpeed==1 then
speedhack_setSpeed(wantedSpeed)
lastSpeed=wantedSpeed
end
else
if lastSpeed~=1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
this basically slowdown game speed whenever I hold down my right mouse button for a more max payne effect. However I'd love to have it tweaked a little bit so every left mouse button could return the speed to normal if the right mouse was being held down. Can you please help me with that?
thank you so much!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum