| View previous topic :: View next topic |
| Author |
Message |
manuelx98 How do I cheat?
Reputation: 0
Joined: 06 Mar 2022 Posts: 2
|
Posted: Sun Mar 06, 2022 9:25 pm Post subject: Close CE when quitting from game? |
|
|
I was looking for a way to auto-close CE when I quit from the targeted game, or alternatively after a certain amount of time.
I tried creating a second timer so after some time it auto-closes, but whenever I try it it auto-closes instantly, without even the time for the game to read it. Can someone help me on this please?
| Code: | getAutoAttachList().add('bblit2.exe') --ce will now watch the process
function onOpenProcess(pid)
local t=createTimer()
t.OnInterval=30000 --wait 10 seconds to let the game load (change this accordingly. If it's a cheat that needs to be activated after loading a game, set it to a minute or two)
t.OnTimer=function(x)
local al=getAddressList()
al.getMemoryRecordByDescription('Horizontal').Active=true
al.getMemoryRecordByDescription('Horizontal').Value=38
al.getMemoryRecordByDescription('Vertical').Active=true
al.getMemoryRecordByDescription('Vertical').Value=38
x.destroy() --the timer is not needed anymore
end
end
function closing()
local t2=createTimer()
t2.OnInterval=80000
t2.OnTimer=function(x)
x.destroy()
closeCE()
end
end
destroy1=closing() |
|
|
| Back to top |
|
 |
AylinCE Grandmaster Cheater Supreme
Reputation: 37
Joined: 16 Feb 2017 Posts: 1530
|
Posted: Sun Mar 06, 2022 10:46 pm Post subject: |
|
|
With a single timer and if the game is open, the code will be activated. Trainer will be closed in 10-12 seconds if the game is not open.
| Code: | if clsTimer then clsTimer.Destroy() clsTimer=nil end
clsTimer=createTimer() clsTimer.Interval=1000 --1 sec
function activeCodeAndCloseTrainer()
clsTimer.Enabled=false
local al=getAddressList()
al.getMemoryRecordByDescription('Horizontal').Active=true
al.getMemoryRecordByDescription('Horizontal').Value=38
al.getMemoryRecordByDescription('Vertical').Active=true
al.getMemoryRecordByDescription('Vertical').Value=38
end
local checkIndex=0
function Start()
checkIndex=tonumber(checkIndex) + 1
local procesID = getProcessIDFromProcessName('game.exe') --your game process name?
if (procesID==nil) then
showMessage("Opss! I guess the game is not open!\nIt will turn off in 10 seconds!\nPlease make sure the game is open!")
if checkIndex==12 then closeCE() return caFree() end
else
openProcess(procesID)
activeCodeAndCloseTrainer()
end
end
clsTimer.Enabled=true -- The timer is active at startup.
clsTimer.OnTimer=Start |
_________________
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Mon Mar 07, 2022 5:54 am Post subject: |
|
|
| Code: |
local t=createTimer(MainForm)
t.Interval=1000
t.OnTimer=function()
if getOpenedProcessID()~=0 and readInteger(process)==nil then
t.destroy()
closeCE()
end
end
|
_________________
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 |
|
 |
manuelx98 How do I cheat?
Reputation: 0
Joined: 06 Mar 2022 Posts: 2
|
Posted: Mon Mar 07, 2022 10:30 am Post subject: |
|
|
| Dark Byte wrote: | | Code: |
local t=createTimer(MainForm)
t.Interval=1000
t.OnTimer=function()
if getOpenedProcessID()~=0 and readInteger(process)==nil then
t.destroy()
closeCE()
end
end
|
|
It works! Thanks!! So what it does is check every second if the game is running and if not it closes CE, right?
|
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Mon Mar 07, 2022 11:02 am Post subject: |
|
|
| Dark Byte wrote: | | Code: |
local t=createTimer(MainForm)
t.Interval=1000
t.OnTimer=function()
if getOpenedProcessID()~=0 and readInteger(process)==nil then
t.destroy()
closeCE()
end
end
|
|
If CE is closing why t.destroy?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25807 Location: The netherlands
|
Posted: Mon Mar 07, 2022 11:52 am Post subject: |
|
|
Imagine someone overriding closeCE with a version that asks if you're sure?
It would then start spamming the question and unable to stop it until the user closes CE.
This way it only tries to close CE once, and that's it
_________________
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: 586
|
Posted: Mon Mar 07, 2022 1:27 pm Post subject: |
|
|
In that case I understand, but in my case stand alone, no internet gaming on my end.
Thanks
|
|
| Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Tue Mar 08, 2022 1:54 am Post subject: |
|
|
one more solution:
| Code: | function IsAttached()
return getOpenedProcessID() == getProcessIDFromProcessName("gta_sa.exe")
end
local t = createTimer(nil)
t.Enabled = true
t.Interval = 1000
t.OnTimer = function()
if not IsAttached() and process ~= nil then
t.destroy()
t = nil
closeCE()
end
end |
|
|
| Back to top |
|
 |
bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 586
|
Posted: Tue Mar 08, 2022 9:36 am Post subject: |
|
|
| Code: |
tstop = createTimer(nil)
timer_setInterval(t, 1000)
timer_setEnabled(tstop, true)--tstop.Enabled = true
timer_onTimer = function(tstop)
if(getOpenedProcessID() ~= 0) and (readInteger("kernel32.dll") == nil) then
tstop.destroy();
closeCE();
end
end
|
Well I had to comment out tsop to allow the table to load.
|
|
| Back to top |
|
 |
|