private void openGame() { if (loaded) { return; } //new memory.dll 1.0.2 function int gameProcId = MemLib.GetProcIdFromName("iw4sp"); //use task manager to find game name. For CoD MW2 it is iw4sp. Do not add .exe extension if (gameProcId != 0) { loaded = true; ProcessID.Invoke(new MethodInvoker(delegate { ProcessID.Text = gameProcId.ToString(); })); MemLib.OpenProcess(gameProcId.ToString()); godmode_checkbox.Invoke(new MethodInvoker(delegate { int godMode = MemLib.ReadInt("godMode", codeFile); if (godMode == 1) { godmode_checkbox.Checked = true; } else { godmode_checkbox.Checked = false; } })); } }
private void OpenGame() { var gameName = MemLib.LoadCode("gameName", codeFile); int gameProcId = MemLib.GetProcIdFromName(gameName); //use task manager to find game name. For CoD MW2 it is iw4sp. Do not add .exe extension if (!isGameLoaded || currentGameId != gameProcId) { ProcessID.Invoke(new MethodInvoker(delegate { ProcessID.Text = gameProcId.ToString(); })); MemLib.OpenProcess(gameProcId); currentGameId = gameProcId; isGameLoaded = true; } if (isGameLoaded && currentGameId != gameProcId) { isGameLoaded = false; ProcessID.Invoke(new MethodInvoker(delegate { ProcessID.Text = "Not Found"; })); activateTrainer_checkbox.Invoke(new MethodInvoker(delegate { activateTrainer_checkbox.Checked = false; })); } }
private void openGame() { if (loaded) { return; } int gameProcId = MemLib.getProcIDFromName("iw5sp"); //use task manager to find game name. For CoD MW3 it is iw5sp. Do not add .exe extension if (gameProcId != 0) { ProcessID.Invoke(new MethodInvoker(delegate { ProcessID.Text = gameProcId.ToString(); })); MemLib.OpenGameProcess(gameProcId); loaded = true; } }