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 


Freeze Time with CH

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
MCHubble
Newbie cheater
Reputation: 0

Joined: 07 Apr 2014
Posts: 18

PostPosted: Mon Apr 07, 2014 2:14 pm    Post subject: Freeze Time with CH Reply with quote

Hello, i want to know how the lua code looks like what can freeze the time of an game i already got something like this in that forum but i think i forgot anything. Heres the code:

lastSpeed=1;

function checkKeys(timer)
if (isKeyPressed(VK_P)) then
if lastspeed ~= 5 then
speedhack_setSpeed(5)
lastSpeed=5
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end

end

t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)

lastSpeed=1;

function checkKeys(timer)
if (isKeyPressed(VK_K)) then
if lastspeed ~= 0 then
speedhack_setSpeed(0)
lastSpeed=0
end
else
if lastspeed ~= 1 then
speedhack_setSpeed(1)
lastSpeed=1
end
end

end

t=createTimer(nil)
timer_setInterval(t, 100)
timer_onTimer(t, checkKeys)
timer_setEnabled(t, true)
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Wed Apr 09, 2014 10:46 am    Post subject: Reply with quote

Well for a speedhack you can just make a script and...

Code:
[ENABLE]
luacall(speedhack_setSpeed(0))


[DISABLE]
luacall(speedhack_setSpeed(1))


That freezes when the script/entry is enabled/ticked, and sets the game to normal speed when the entry is disabled/unticked.

_________________
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