| View previous topic :: View next topic |
| Author |
Message |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Sat Sep 26, 2015 12:34 pm Post subject: two speed hack codes wont work |
|
|
hey
i tried to use this code by darkbytes to make slow hack and speed hack in one trainer but for some reason only one is working
| Code: | lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_CAPITAL)) then
if lastspeed ~= 0.3 then
speedhack_setSpeed(0.3)
lastSpeed=0.3
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
lastSpeed=1;
function speedhack(timer)
if (isKeyPressed(VK_MBUTTON)) then
if lastspeed ~= 15 then
speedhack_setSpeed(15)
lastSpeed=15
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, speedhack)
timer_setEnabled(t, true) |
|
|
| Back to top |
|
 |
Rydian Grandmaster Cheater Supreme
Reputation: 31
Joined: 17 Sep 2012 Posts: 1358
|
Posted: Sat Sep 26, 2015 12:50 pm Post subject: |
|
|
'Cause you're overwriting the first timer with the second by setting them both in "t"?
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Sat Sep 26, 2015 1:04 pm Post subject: |
|
|
overriding t shouldn't be an issue.
your timer unsets the speedhack when the key is not pressed(caps lock can set it to 0.3, but because the middle mousebutton isn't doewn it sets it to 1), merge the scripts into one function instead
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Redogg Cheater
Reputation: 0
Joined: 16 Feb 2015 Posts: 27
|
Posted: Sat Sep 26, 2015 2:05 pm Post subject: |
|
|
| Dark Byte wrote: | overriding t shouldn't be an issue.
your timer unsets the speedhack when the key is not pressed(caps lock can set it to 0.3, but because the middle mousebutton isn't doewn it sets it to 1), merge the scripts into one function instead |
i got it thanks
| Code: | lastSpeed=1;
function checkKeys(timer)
if (isKeyPressed(VK_CAPITAL)) then
if lastspeed ~= 0.3 then
speedhack_setSpeed(0.3)
lastSpeed=0.3
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
if (isKeyPressed(VK_MBUTTON)) then
if lastspeed ~= 15 then
speedhack_setSpeed(15)
lastSpeed=15
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end
end
end |
btw how do i get directx hook? its possible to do it with cheat engine?
i want to create a crosshair in dx9 game, when i tried to do it, its crashed my game
theres anyway to create a crosshair on dx9 game?
|
|
| Back to top |
|
 |
|