View previous topic :: View next topic |
Author |
Message |
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Apr 10, 2015 8:34 pm Post subject: Quit CE when game shuts down |
|
|
I have seen a post concerning this, but after 3 searches I haven't found it.
What would be the code lines to quit CE when/if the game attached shuts stops.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Fri Apr 10, 2015 8:48 pm Post subject: |
|
|
Code: |
t=createTimer(nil)
t.Interval=1000
t.OnTimer=function(t)
if (getOpenedProcessID()~=0) and (readInteger("kernel32.dll")==nil) then
closeCE()
end
end
t.Enabled=true
|
_________________
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 |
|
|
bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Apr 10, 2015 8:55 pm Post subject: |
|
|
I can understand this (readInteger("kernel32.dll")==nil)
The other condition (getOpenedProcessID()~=0 seems odd, it would seem that if the game is running then this would be true, but if the game quits then the process ID seems like it would be 0?
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Apr 10, 2015 10:00 pm Post subject: |
|
|
If CE is able to resolve "kernel32.dll" then that means it is attached to something.
When getOpenedProcessID() equals zero, then CE has never been attached to anything.
So, the if statement sees if the Process ID is not zero (meaning CE was attached to something at some time), but "kernel32.dll" resolves to nil (meanining CE isn't currently attached to anything) and then closes.
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Apr 11, 2015 2:57 am Post subject: |
|
|
instead of kernel32.dll you can use other modules as well:
(readInteger("gta5.exe")==nil)
If it is directx9 game:
(readInteger("d3d9.dll")==nil)
_________________
|
|
Back to top |
|
|
|