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 


what code should i write?

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

Joined: 19 Jun 2022
Posts: 2

PostPosted: Sun Jun 19, 2022 4:09 pm    Post subject: what code should i write? Reply with quote

i created a trainer today i want to add a function one day but i don't know how help me please.
For example, I want it to return to normal when I press the F2 key, I want it to be fast when I press the F3 key. How can I do this, what code do I need to write?



 Description:
 Filesize:  14.16 KB
 Viewed:  2053 Time(s)





dd.jpg
 Description:
 Filesize:  158.07 KB
 Viewed:  2061 Time(s)

dd.jpg


Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Sun Jun 19, 2022 8:37 pm    Post subject: Reply with quote

Check here: https://forum.cheatengine.org/viewtopic.php?t=619668
Back to top
View user's profile Send private message
LoRdHamit
How do I cheat?
Reputation: 0

Joined: 19 Jun 2022
Posts: 2

PostPosted: Mon Jun 20, 2022 6:51 am    Post subject: Reply with quote

Please someone knowledgeable reply, I'm new to this so I don't know


kk.jpg
 Description:
 Filesize:  43 KB
 Viewed:  1991 Time(s)

kk.jpg


Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Mon Jun 20, 2022 8:24 am    Post subject: Reply with quote

Code:

function CETrainer_CEButton1Click()
  speedhack_setSpeed(1)
end

function CETrainer_CEButton2Click()
   if tmr then tmr.destroy(); tmr = nil end
   local tmr = createTimer(getMainForm())
   tmr.Interval = 100
   tmr.OnTimer = function()
                     if (isKeyPressed(VK_F2)) then
                        speedhack_setSpeed(2)
                     else
                        return
                     end
                  end
end
Back to top
View user's profile Send private message
Frouk
Grandmaster Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 510

PostPosted: Mon Jun 20, 2022 11:39 am    Post subject: Reply with quote

isn't it easy to use createHotkey?
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 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