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 


[HELP] auto hit dont want to stop
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
AylinCE
Grandmaster Cheater Supreme
Reputation: 37

Joined: 16 Feb 2017
Posts: 1549

PostPosted: Thu Sep 10, 2020 6:37 am    Post subject: Reply with quote

Aylin wrote:
Code:

function t_htkey()
if t.Enabled==false then
t.Enabled=true
else
t.Enabled=false
end
end

--A hot key was assigned for the "F8" timer. (stop - start click F8)
if tKey then tKey.destroy() end
tKey=createHotkey(t_htkey, VK_F8)


or

Code:
function t_htkey()
if  CETrainer.CECheckBox1.Checked==false then
--t.Enabled=true
CETrainer.CECheckBox1.Checked = true
else
--t.Enabled=false
CETrainer.CECheckBox1.Checked = false
end
end


---------------------------------------------------

Code: https://forum.cheatengine.org/viewtopic.php?p=5764389#5764389

vil33 wrote:

sorry master...
when i try code 1 [ sc1 ] = show error
" attempt to index a nil value ( global 't')
when i try code 2 [ sc 2] = cant compile script


I was hoping you would add "Timer (t)" to the code sample I gave above.
This is the reason for the error received.

Code:
if t then t.destroy() t=nil end
t = createTimer()
t.interval = 10
t.Enabled = false
--t.OnTimer = AutoShoot

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
vil33
Cheater
Reputation: 0

Joined: 29 Jul 2020
Posts: 34

PostPosted: Sat Sep 12, 2020 8:05 am    Post subject: Reply with quote

Aylin wrote:
Aylin wrote:
Code:

function t_htkey()
if t.Enabled==false then
t.Enabled=true
else
t.Enabled=false
end
end

--A hot key was assigned for the "F8" timer. (stop - start click F8)
if tKey then tKey.destroy() end
tKey=createHotkey(t_htkey, VK_F8)


or

Code:
function t_htkey()
if  CETrainer.CECheckBox1.Checked==false then
--t.Enabled=true
CETrainer.CECheckBox1.Checked = true
else
--t.Enabled=false
CETrainer.CECheckBox1.Checked = false
end
end


---------------------------------------------------

Code: https://forum.cheatengine.org/viewtopic.php?p=5764389#5764389

vil33 wrote:

sorry master...
when i try code 1 [ sc1 ] = show error
" attempt to index a nil value ( global 't')
when i try code 2 [ sc 2] = cant compile script


I was hoping you would add "Timer (t)" to the code sample I gave above.
This is the reason for the error received.

Code:
if t then t.destroy() t=nil end
t = createTimer()
t.interval = 10
t.Enabled = false
--t.OnTimer = AutoShoot

Oh i see...
Sorry master
Thanks for your helping master, you are so kind
Thank for all master who reply me thread Very Happy
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
Goto page Previous  1, 2
Page 2 of 2

 
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