Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$lua}
- -- Function to attach to PCSX2 and set the memory range in Cheat Engine
- function attach()
- -- Try to open the process pcsx2-qt.exe
- if not openProcess('pcsx2-qt.exe') then
- sleep(250)
- -- Check if no process is currently attached
- if getOpenedProcessID() == 0 then
- -- Auto-attach to pcsx2-qt.exe
- getAutoAttachList().add('pcsx2-qt.exe')
- sleep(250)
- end
- end
- -- Check if process ID is still 0 (meaning no process opened) and set an error if necessary
- if getOpenedProcessID() == 0 then
- print("Failed to attach to pcsx2-qt.exe")
- return
- end
- end
- {$asm}
- luaCall(attach())
- [ENABLE]
- [DISABLE]
Advertisement
Add Comment
Please, Sign In to add comment