Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


HOT HOT - HELP HELP, plssssss

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
ptcptc
How do I cheat?
Reputation: 0

Joined: 16 Jul 2012
Posts: 2

PostPosted: Mon Jul 16, 2012 6:55 pm    Post subject: HOT HOT - HELP HELP, plssssss Reply with quote

I hav Function ABC()
I want when press Hotkey() then ABC()
And when unpress cancel ABC()

Plsssssss, help me
Tks all
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25296
Location: The netherlands

PostPosted: Mon Jul 16, 2012 7:15 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
ptcptc
How do I cheat?
Reputation: 0

Joined: 16 Jul 2012
Posts: 2

PostPosted: Mon Jul 16, 2012 7:25 pm    Post subject: Reply with quote

so sorry, i'm wrong.
I want : when press Hotkey() execute ABC
then press Hotkey() cancel ABC()
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Mon Jul 16, 2012 10:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites