Exemplo n.º 1
0
        private bool Attach(Process process)
        {
            _memory      = new ExternalProcessMemory(process);
            _baseAddress = _memory.GetModule("BlackOpsColdWar.exe").BaseAddress;

            _playerPedPtr  = _memory.Read <IntPtr>(_baseAddress + Offsets.PlayerBase + 0x8);
            _zmGlobalBase  = _memory.Read <IntPtr>(_baseAddress + Offsets.PlayerBase + 0x60);
            _zmBotBase     = _memory.Read <IntPtr>(_baseAddress + Offsets.PlayerBase + 0x68);
            _zmBotListBase = _memory.Read <IntPtr>(_zmBotBase + 0x8);

            if (_playerPedPtr == IntPtr.Zero || _zmGlobalBase == IntPtr.Zero || _zmBotBase == IntPtr.Zero || _zmBotListBase == IntPtr.Zero)
            {
                _console.WriteLine("Make sure you are inside a match before you press start.", Brushes.Red);
                return(false);
            }

            _console.WriteLine($"playerPedPtr: {_playerPedPtr}", Brushes.Green);
            _console.WriteLine($"zmGlobalBase: {_zmGlobalBase}", Brushes.Green);
            _console.WriteLine($"zmBotBase: {_zmBotBase}", Brushes.Green);
            _console.WriteLine($"zmBotListBase: {_zmBotListBase}", Brushes.Green);
            _console.WriteLine($"Attached: BaseAddress: {_baseAddress}", Brushes.Green);

            return(true);
        }
Exemplo n.º 2
0
        private void StartButton_Click(object sender, RoutedEventArgs e)
        {
            _core = new Core(_console);

            if (_core.Start())
            {
                _console.WriteLine("We gucci fam.", Brushes.Green);
                WeaponIdComboBox.ItemsSource = _core.MiscFeatures.weapons;
                EnableContentOnWindow();

                _backgroundWorker.DoWork += BackgroundWorkerDoWork;
                _backgroundWorker.RunWorkerAsync();
            }
            else
            {
                _console.WriteLine("Please start inside a match.", Brushes.Red);
            }
        }