Step 1
Put together by gamesguru, shout out to everyone at 'The Code Project'!
I don't cover any basics so you'll have to do that on your own. As far as ASM goes.
But it is a very simple guide on how to make game trainers with C#.
You should have a fair amount of experience with C# before you start this guide, but if you want to start as a beginner...you can try! It's not too hard...and also YOU MUST have experience with cheat engine.
OK, so let's get started!
Finding a process name and detecting if it is present.
This step is not 100% necessary, but you can add nice labels and what-not that tells people if the process is present or not.
This code will detect if notepad is running if it is then a messagebox is shown telling you that one is present, if notepad's not present, a messagebox is shown telling you that one is not present. Bottomline, you have to remember this (highlighted part is vital!):
System.Diagnostics.Process[] myprocesses = System.Diagnostics.Process.GetProcessesByName("notepad");
if (myprocesses.Length != 0)
{
MessageBox.Show("Notepad instance found!", "Instance found!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("No notepad instance found!", "No instance found!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
That's it, the first step, detection of a selected process, 'myprocesses' will be used later on too, so you need to know this.
Demo Project notepadlocater.zip
You've now completed Step 1.