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 


always autoattach

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

Joined: 18 Sep 2016
Posts: 16

PostPosted: Sat Nov 05, 2016 5:01 am    Post subject: always autoattach Reply with quote

hello, i need a script for always autoattaching to gta3.exe process because when i use
aalist=getAutoAttachList()
stringlist_add(aalist,"Tutorial-i386.exe");

then it gets only attached when i start game before trainer

and i want it to be always atached so i dont need to reopen trainer

how?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Nov 05, 2016 9:38 am    Post subject: Re: always autoattach Reply with quote

You used stringlist_add(aalist,"gta3.exe") right?





Probably symbols aren't loaded. Add this:
Code:
function onOpenProcess(processid)
  sleep(3000)
  reinitializeSymbolhandler()
end





Or, instead of
Code:
aalist=getAutoAttachList()
stringlist_add(aalist,"gta3.exe")





Try this:
Code:
function delayedOpenProcess(processname,delayInMilliseconds)

  local processlist=createStringlist()
  local processnameLower = processname:lower()

  local timer = createTimer(nil)
  timer.Interval = 100
  timer.OnTimer = function (t)
    getProcesslist(processlist)
    for i=0,processlist.Count-1 do
      if processlist[i]:sub(10):lower() == processnameLower
      then
        createNativeThread(function (t)
          sleep(delayInMilliseconds)
          openProcess(processname)
          reinitializeSymbolhandler()
          speakEnglish('process opened')
        end)
        processlist.destroy()
        t.destroy()
        break
      end
    end
  end -- timer.OnTimer
end

-- delayedOpenProcess(string processname, integer delayInMilliseconds)

delayedOpenProcess('gta3.exe',3000)

_________________


Last edited by mgr.inz.Player on Sat Nov 05, 2016 1:00 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
CityOfTheIris
Newbie cheater
Reputation: 0

Joined: 18 Sep 2016
Posts: 16

PostPosted: Sat Nov 05, 2016 10:23 am    Post subject: Reply with quote

thx <3
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