View previous topic :: View next topic |
Author |
Message |
ptcptc How do I cheat? Reputation: 0
Joined: 16 Jul 2012 Posts: 2
|
Posted: Mon Jul 16, 2012 6:55 pm Post subject: HOT HOT - HELP HELP, plssssss |
|
|
I hav Function ABC()
I want when press Hotkey() then ABC()
And when unpress cancel ABC()
Plsssssss, help me
Tks all
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Mon Jul 16, 2012 7:15 pm Post subject: |
|
|
You can create a hotkey using "createHotkey(function, key)"
Then when it is pressed execute abc and create a timer that runs every 100 milliseconds or so
In that timer call "isKeyPressed(key)" and check if it's still down or not, if not, disable what ABC did. (By calling DEF() )
_________________
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 |
|
|
ptcptc How do I cheat? Reputation: 0
Joined: 16 Jul 2012 Posts: 2
|
Posted: Mon Jul 16, 2012 7:25 pm Post subject: |
|
|
so sorry, i'm wrong.
I want : when press Hotkey() execute ABC
then press Hotkey() cancel ABC()
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Mon Jul 16, 2012 10:15 pm Post subject: |
|
|
If you want a toggle, you'll need a dummy value.
On keypress, check dummy value., and
- if dummy value is true, stop timer/code/whatever and set dummy value to false.
- if dummy value is false, start timer/code/whatever and set dummy value to true.
|
|
Back to top |
|
|
|