• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 15
    1. #1
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1

      I can't find the problem :(

      Silent VPN
      I'm pretty new to C# and C++ but i followed fleep's memory aimbot and typed everything exactly like he did,
      but i cant find the freakin problem, each time i get and error with that ive got the wrong input row (im dutch)
      Code:
      Form1.cs
      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Linq;
      using System.Text;
      using System.Windows.Forms;
      using ProcessMemoryReaderLib;
      using System.Globalization;
      using System.Diagnostics;
      
      namespace Assault_Cube_Aimbot
      {
          public partial class Form1 : Form
          {
      
              Process[] MyProcess;
              ProcessModule mainModule;
              ProcessMemoryReader Mem = new ProcessMemoryReader();
              PlayerData MainPlayer = new PlayerData();
      
              #region ----------Adresses----------
              int MainPlayerBase = 0x4E4DBC;
              int [] MainPlayerMultiLvl = new int[] { 0x30 };
              PlayerDataAddr MainPlayersOffsets = new PlayerDataAddr(0x10, 0x14, 0x4, 0xC, 0x8, 0xC4);
      
              #region ----------ENEMY Adresses----------
              List<PlayerData> EnemyAdresses = new List<PlayerData>();
              int [] enOneMultiLevel = new int[] { 0x4, 0x30 };
              //int [] enTwoMultiLevel = new int[] { 0x4, 0x30 };
              //int [] enThreeMultiLevel = new int[] { 0x4, 0x30 };
      
      
      
      
              #endregion
      
              #endregion
      
              float PI = 3.14159265f;
      
              bool GameFound = false;
              bool FocusingOnEnemy = false;
              int Focustarget = -1;
      
      
              public Form1()
              {
                  InitializeComponent();
              }
      
              private void GameChoiceCB_SelectedIndexChanged(object sender, EventArgs e)
              {
                  try
                  {
                      for (int i = 0; i < MyProcess.Length; i++)
                      {
                          if (GameChoiceCB.SelectedItem.ToString().Contains(MyProcess[i].ProcessName))
                          {
                              MyProcess[0] = Process.GetProcessById(int.Parse(GameChoiceCB.Text.Replace(MyProcess[i] + "-", "")));
                              mainModule = MyProcess[0].MainModule;
                              Mem.ReadProcess = MyProcess[0];
                              Mem.OpenProcess();
                              GameFound = true;
      
                              MainPlayer.baseAdress = MainPlayerBase;
                              MainPlayer.multilevel = MainPlayerMultiLvl;
                              MainPlayer.offsets = new PlayerDataAddr(MainPlayersOffsets.xMouse, MainPlayersOffsets.yMouse, MainPlayersOffsets.xpos, MainPlayersOffsets.zpos, MainPlayersOffsets.ypos, MainPlayersOffsets.health);
      
      
                              SetupEnemyVars();
                          }
                      }
      
      
      
                  }
                  catch (Exception ex)
                  {
                      MessageBox.Show("Could not connect to Assault Cube, Because " + ex.Message);
      
                  }
      
              }
      
              private void processTMR_Tick(object sender, EventArgs e)
              {
                  if (GameFound)
                  {
                      int PlayerBase = Mem.ReadMultiLevelPointer(MainPlayer.baseAdress, 4, MainPlayer.multilevel);
      
                      int hotkey = ProcessMemoryReaderApi.GetKeyState(02); //Right mouse
                      if ((hotkey & 0x8000) != 0)
                      {
                          FocusingOnEnemy = true;
                          Aimbot();
                      }
                      else
                      {
                          FocusingOnEnemy = false;
                          Focustarget = -1;
                      }
                  }
                  try
                  {
                      if (MyProcess != null)
                      {
                          if (MyProcess[0].HasExited)
                              GameFound = false;
       
                      }
      
                  }
      
                  catch (Exception ex)
      
                  {
                      MessageBox.Show("Aimbot could no longer run, because " + ex.Message);
      
      
                  }
              }
      
      
              private void Aimbot()
              {
                  PlayerDataVec playerDataVec = GetPlayerData(MainPlayer);
                  List<PlayerDataVec> EnemiesDataVec = new List<PlayerDataVec>();
      
                  for (int i = 0; i < EnemyAdresses.Count; i++)
                  {
                      PlayerDataVec enemyDataVector = GetPlayerData(EnemyAdresses[i]);
                      EnemiesDataVec.Add(enemyDataVector);
                  }
                  if (playerDataVec.health > 0)
                  {
                      int target = 0;
                      if (FocusingOnEnemy && Focustarget != -1)
                      {
                          if (EnemiesDataVec[Focustarget].health > 0)
                              target = Focustarget;
                          else target = FindClosestEnemyIndex(EnemiesDataVec.ToArray(), playerDataVec);
                      }
                      else target = FindClosestEnemyIndex(EnemiesDataVec.ToArray(), playerDataVec);
      
                          if(target != -1)
                          {
                              Focustarget = target;
                              if(EnemiesDataVec[target].health > 0)
                              AimAtTarget(EnemiesDataVec[target], playerDataVec);
      
                             
                          }
                  }
      
              }
      
              private void AimAtTarget(PlayerDataVec enemyDataVector, PlayerDataVec playerDataVector)
              {
                  float pitchY = (float)Math.Asin((enemyDataVector.zPos - playerDataVector.zPos) /
                      Get3dDistance(enemyDataVector, playerDataVector))
                      * 180 / PI;
                  float yawX = -(float)Math.Atan2(enemyDataVector.xPos - playerDataVector.xPos, enemyDataVector.yPos - playerDataVector.yPos
                      / PI * 180 + 180);
      
                  int PlayerBase = Mem.ReadMultiLevelPointer(MainPlayer.baseAdress, 4, MainPlayer.multilevel);
      
                  Mem.WriteFloat(PlayerBase + MainPlayer.offsets.xMouse, yawX);
                  Mem.WriteFloat(PlayerBase + MainPlayer.offsets.yMouse, pitchY);
      
              }
      
      
              private int FindClosestEnemyIndex(PlayerDataVec[] enemiesDataVec, PlayerDataVec myPosition)
              {
                  float[] distances = new float[enemiesDataVec.Length];
                  for (int i = 0; i < enemiesDataVec.Length; i++)
                  {
                      if (enemiesDataVec[i].health > 0)
                          distances[i] = Get3dDistance(enemiesDataVec[i], myPosition);
                      else
                          distances[i] = float.MaxValue;
                  }
      
                  float [] newDistances = new float[distances.Length];
                  Array.Copy(distances, newDistances, distances.Length);
                  Array.Sort(newDistances);
      
                  for (int i = 0; i < distances.Length; i++)
                  {
                      if (distances[i] == newDistances[0])
                          return i;
                  }
                  return -1;
      
              }
      
              private float Get3dDistance(PlayerDataVec to, PlayerDataVec from)
              {
                  return (float)(Math.Sqrt(
                      ((to.xPos - from.xPos) * (to.xPos - from.xPos)) +
                      ((to.yPos - from.yPos) * (to.yPos - from.yPos)) +
                      ((to.zPos - from.zPos) * (to.zPos - from.zPos))
                      ));
              }
              private PlayerDataVec GetPlayerData(PlayerData updatePlayer)
              {
                  PlayerDataVec playerRet = new PlayerDataVec();
                  int PlayerBase = Mem.ReadMultiLevelPointer(updatePlayer.baseAdress, 4, updatePlayer.multilevel);
                  playerRet.xMouse = Mem.ReadFloat(PlayerBase + updatePlayer.offsets.xMouse);
                  playerRet.yMouse = Mem.ReadFloat(PlayerBase + updatePlayer.offsets.yMouse);
                  playerRet.xPos = Mem.ReadFloat(PlayerBase + updatePlayer.offsets.xpos);
                  playerRet.yPos = Mem.ReadFloat(PlayerBase + updatePlayer.offsets.ypos);
                  playerRet.zPos = Mem.ReadFloat(PlayerBase + updatePlayer.offsets.zpos);
                  playerRet.health = Mem.ReadInt(PlayerBase + updatePlayer.offsets.health);
                  return playerRet;
      
              }
      
              private void GameChoiceCB_Click(object sender, EventArgs e)
              {
                  GameChoiceCB.Items.Clear();
                  MyProcess = Process.GetProcesses();
                  for (int i = 0; i < MyProcess.Length; i++)
                  {
                      GameChoiceCB.Items.Add(MyProcess[i].ProcessName + "-" + MyProcess[i].Id);
      
      
      
                  }
              }
      
              private void SetupEnemyVars()
              {
                  PlayerData En1 = new PlayerData();
                  En1.baseAdress = MyProcess[0].MainModule.BaseAddress.ToInt32() + 0x000E4E08;
                  En1.multilevel = enOneMultiLevel;
                  En1.offsets = MainPlayer.offsets;
                  EnemyAdresses.Add(En1);
      
              }
          
      
          
      
              private void Form1_Load(object sender, EventArgs e)
              {
                  processTMR.Enabled = true;
              }
          
        
          }
      }
      and my playerinfo.cs
      Code:
      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      
      namespace Assault_Cube_Aimbot
      {
          public class PlayerDataAddr
          {
              public int xMouse;
              public int yMouse;
              public int xpos;
              public int ypos;
              public int zpos;
              public int health;
      
              public PlayerDataAddr(int _xMouse, int _yMouse, int _xPos, int _yPos, int _zPos, int _health)
              {
                  xMouse = _xMouse;
                  yMouse = _yMouse;
                  xpos = _xPos;
                  ypos = _yPos;
                  zpos = _zPos;
                  health = _health;
              }
          }
      
          public struct PlayerData
          {
              public int baseAdress;
              public int[] multilevel;
              public PlayerDataAddr offsets;
          }
      
          public struct PlayerDataVec
          {
              public float xMouse;
              public float yMouse;
              public float xPos;
              public float yPos;
              public float zPos;
              public int health;
      
          }
      }
      and i added and included the extra files inside any conclusions?
      helpp me please!

    2. #2
      RTFM
      Shootin Pool!
       
      Coding
       
      Syperus's Avatar
      Join Date
      Oct 2012
      Location
      127.0.0.1
      Posts
      436
      Thanks (-->)
      101
      Thanks (<--)
      131
      What's the error you're getting? Also make sure in the future if you have questions or problems while working on one of the tutorials that you post it in the Tutorial Help section so your issue could be addressed properly.
      Blacks Ops Zombies, BioShock Infinite Array of Bytes
      "People say I'm a bad influence. I say the world's already fucked, I'm just adding to it" -Eminem

    3. #3
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      Thx for helping me, i didnt know that i should post it somewhere else , My pc is on dutch, so i get "De gebruikte invoerreeks is onjuist" in google translate i get "the selected item (of the combobox) is wrong"
      Or something like that?

    4. #4
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Is an exception being called or can't you even start the program?

      In which line is it?

    5. #5
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      There isn't any line called, the compiler doesn't recognize it as a problem, i've posted it under Tutorials Help or something like that and the files, so see it for urself and there's also a picture!

    6. #6
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Quote Originally Posted by EleRtan View Post
      There isn't any line called, the compiler doesn't recognize it as a problem, i've posted it under Tutorials Help or something like that and the files, so see it for urself and there's also a picture!
      Can't find it. Post link here.

    7. #7
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      Quote Originally Posted by till0sch97 View Post
      Can't find it. Post link here.
      I did like to, but it must be confirmed, I'm i right?
      I send it half an hour ago, but it still didn't appear in the list.

    8. #8
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Quote Originally Posted by EleRtan View Post
      I did like to, but it must be confirmed, I'm i right?
      I send it half an hour ago, but it still didn't appear in the list.

      It has to be approved by a moderator obviously -.-

      How about compressing it to a zip file, upload it on file-upload.net and PM me?

    9. #9
      Jr.Coder
      C# All the way!
       
      At Work
       
      Elertan's Avatar
      Join Date
      Mar 2013
      Location
      Everywhere!
      Posts
      84
      Thanks (-->)
      4
      Thanks (<--)
      1
      Quote Originally Posted by till0sch97 View Post
      It has to be approved by a moderator obviously -.-

      How about compressing it to a zip file, upload it on file-upload.net and PM me?
      Ofcourse!

      But also explain the difference at rar and zip, xD why just not rar?
      Il do it!

      Thx, I appriciate your help!
      Last edited by Spock; 03-27-2013 at 07:59 AM. Reason: No outside download links allowed. Please use the attachments. :)

    10. #10
      Respected Hacker
      Learning to hack games!
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Silent VPN
      Quote Originally Posted by EleRtan View Post
      Ofcourse!

      But also explain the difference at rar and zip, xD why just not rar?
      Il do it!

      Thx, I appriciate your help!
      You're welcome, as I said you 3 times now(double post,PM), line 61 is the problem

      There is no difference between rar and zip. (There is but who cares xD)

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Help] How to Find Traceline?
      By [GH]Rake in forum Hacking Help
      Replies: 3
      Last Post: 04-08-2016, 09:44 PM
    2. [Tutorial] [TUT] How to find certain addresses
      By till0sch in forum Game Hacking Tutorials
      Replies: 3
      Last Post: 03-31-2015, 04:05 PM
    3. [Help] How do I find the CS.GO offsets?
      By noobhacky in forum Hacking Help
      Replies: 8
      Last Post: 06-05-2014, 01:16 AM
    4. [Help] Find memory?
      By Pinkieseb in forum GH Tutorials Help
      Replies: 5
      Last Post: 01-19-2014, 06:16 PM
    5. How do you find offsets?
      By jKnox in forum Hacking Help
      Replies: 7
      Last Post: 01-21-2013, 01:10 PM

    Tags for this Thread