View previous topic :: View next topic |
Author |
Message |
TheInsaneHacker How do I cheat?
Reputation: 0
Joined: 27 Sep 2019 Posts: 1
|
Posted: Fri Sep 27, 2019 11:24 am Post subject: Need some help (speedhack lua) |
|
|
Hi,
I've just made a speedhack script in lua, but it doesn't work for some reason.
When I execute it, there is no script error, but when I press on my "S" key the speed doesn't change.
I have also tried to change the 0x53 to VK_ESCAPE or something, but that didn't work either.
I was wondering if someone can help me out .
This is my script in lua:
lastspeed = 1
if (isKeyPressed(0x53)) then
if lastspeed == 1 then
speedhack_setSpeed(0.5)
lastspeed = 0.5
end
else
if lastspeed == 0.5 then
speedhack_setSpeed(1)
lastspeed = 1
end
end
|
|
Back to top |
|
 |
FreeER Grandmaster Cheater Supreme
Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Fri Sep 27, 2019 12:03 pm Post subject: |
|
|
you need an infinite loop, a timer, or an actual hotkey so it doesn't run just once. I just got in from exercising so don't really feel like typing code off the top of my head but there are various examples on the forum you should be able to find by searching for speedhack_setSpeed along with createTimer or createHotkey
_________________
|
|
Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3325
|
Posted: Fri Sep 27, 2019 1:27 pm Post subject: Re: Need some help (speedhack lua) |
|
|
TheInsaneHacker wrote: | Hi,
I've just made a speedhack script in lua, but it doesn't work for some reason.
When I execute it, there is no script error, but when I press on my "S" key the speed doesn't change.
I have also tried to change the 0x53 to VK_ESCAPE or something, but that didn't work either.
I was wondering if someone can help me out .
This is my script in lua:
lastspeed = 1
if (isKeyPressed(0x53)) then
if lastspeed == 1 then
speedhack_setSpeed(0.5)
lastspeed = 0.5
end
else
if lastspeed == 0.5 then
speedhack_setSpeed(1)
lastspeed = 1
end
end |
You know, you could just set up hotkeys in CE for exactly that.
|
|
Back to top |
|
 |
|