Exemple #1
0
        /// <summary>
        /// Get the game's memory by it's process name.
        /// </summary>
        /// <param name="processName"></param>
        private static void GetGameMemory(string processName)
        {
            GameMemory = new RunningMemory(_gameProcessName);
            GameMemory.ReadInt32((IntPtr)0);

            NFSScript.Core.GameMemory.Memory = GameMemory;
            NFSScript.Core.GameMemory.GenericMemory = new GMemory(GameMemory.processName);
            if (Settings.Debug)
                RunningMemory.debugMode = true;
        }
Exemple #2
0
 /// <summary>
 /// Call the OnExit method for any loaded scripts and shuts down the program.
 /// </summary>
 private static void Terminate()
 {
     CallScriptsOnExit();
     _timer.Dispose();
     _scripts = null;
     _inGameplay = false;
     _inRace = false;
     GameMemory = null;
     _hookId = IntPtr.Zero;
     Environment.Exit(0);
 }
Exemple #3
0
        /// <summary>
        /// Get the game's memory by it's process name.
        /// </summary>
        /// <param name="processName"></param>
        private static void GetGameMemory(string processName)
        {
            gameMemory = new RunningMemory(gameProcessName);
            gameMemory.ReadInt32((IntPtr)0);

            GameMemory.memory        = gameMemory;
            GameMemory.genericMemory = new GMemory(gameMemory.processName);
            if (settingDebug == 1)
            {
                RunningMemory.debugMode = true;
            }
        }