I've found a tutor. There is a ready two classes:
CheatEngine.Win32
CheatEngine.Memory
Here is the link - matejtomcik . com/Download/?n=CheatEngineCSharpHelpers
Code:
namespace Trainer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Process[] processes = Process.GetProcessesByName("GTA5");
if (processes.Length > 0)
{
using (Utilities.Memory memory = new Utilities.Memory(processes[0]))
{
IntPtr address = memory.GetAddress("GTA5.exe+02399160+5d8");
memory.ReadUInt32(address);
MessageBox.Show(address.ToString());
}
}
}
}
}
And when i tryin' to read it there is "An unhandled exception of type 'System.AccessViolationException' occurred. Attempted to read or write protected memory". Address that im tryin to read is 100% correct (checked it in CE and C++ Trainer).