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 


How to disable a AA script soon after enabling it?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
The Dab
Cheater
Reputation: 0

Joined: 22 May 2017
Posts: 33

PostPosted: Thu Aug 10, 2017 2:19 pm    Post subject: How to disable a AA script soon after enabling it? Reply with quote

For example as soon as the script is enabled, a timer will start counting 5 seconds, then after the 5 seconds is up the script will automatically disable.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Fri Aug 11, 2017 10:27 am    Post subject: Reply with quote

Code:
[ENABLE]

// ... whatever code

{$lua}
if syntaxcheck then return end
-- CE 6.7 provides the memory record as memrec
-- if the user isn't running CE >= 6.7 or the name changes at some point
-- this is an alternative, though it depends on the user not changing the name
-- using the ID is a little more reliable but you have to open the CT to find it
-- or use the extra memrec info lua extension found on the CE forums
local memrec = memrec or getAddressList().getMemoryRecordByDescription("Script Name")

local timer = createTimer()
timer.Interval = 5 * 1000 -- 1000 milliseconds per second
timer.OnTimer = function(theTimerCallingThisFunction)
  memrec.Active = false -- deactivate the script
  timer.destroy() -- destroy the timer so it doesn't keep running
end
{$asm}

[DISABLE]
// whatever code
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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