Results 1 to 11 of 11
  1. #1
    fullweeb's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    1

    Help with Bhop hack

    I'm trying to make a bhop hack that works better than say an ahk script. All I can seem to find info on, is checking if the player is on the ground then sending a jump input. Not sure what I'm doing wrong but mine works like an ahk script, where it just seems to be spamming jump constantly and doesn't actually give good bhops. You have to strafe and everything. I want it to make it as easy as possible to bhop without writing to memory. (since I've read that'll make it detected a lot easier.)

    Also it gets stuck. Like it jumps even when you're not pressing the jump key.

    Any help would be fantastic.

    Anyway here's my code:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System****;
    using System.Diagnostics;
    using System.Numerics;
    using System.Runtime.InteropServices;
    
    namespace bhop
    {
    	class Program
    	{
    		[DllImport("kernel32.dll")]
    		public static extern int OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
    		[DllImport("kernel32.dll")]
    		public static extern bool ReadProcessMemory(int hProcess, int lpBaseAddress, byte[] buffer, int size, int lpNumberOfBytesRead);
    		[DllImport("user32.dll")]
    		static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, UIntPtr dwExtraInfo);
    		[DllImport("user32.dll")]
    		public static extern short GetAsyncKeyState(int vKey);
    		[DllImport("user32.dll")]
    		static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
    
    		static int BaseAdressClientDLL = 0;
    		static int pHandle = 0;
    
    		const int _localPlayer = 0x00A7D4CC;
    		const int _entityList = 0x04A98154;
    		const int _mflags = 0x00000100;
    		const int FL_ONGROUND = 257;
    
    
    		static void Main(string[] args)
    		{
    
    			bool FoundCSGO = false;
    			while (true)
    			{
    				if (FoundCSGO == false)
    				{
    					foreach (Process Proc in Process.GetProcesses())
    					{
    						if (Proc.ProcessName.Equals("csgo"))
    						{
    							pHandle = OpenProcess(0x001F0FFF, false, Proc.Id);
    							foreach (ProcessModule Module in Proc.Modules)
    							{
    								if (Module.ModuleName.Equals("client.dll"))
    								{
    									BaseAdressClientDLL = (int)Module.BaseAddress;
    									int LocalPlayer = readInt(BaseAdressClientDLL + _localPlayer);
    									int jump = readInt(LocalPlayer + _mflags);
    									FoundCSGO = true;
    								}
    							}
    						}
    					}
    				}
    				else
    				{
    					int LocalPlayer = readInt(BaseAdressClientDLL + _localPlayer);
    					int jump = readInt(LocalPlayer + _mflags);
    					if (GetAsyncKeyState(0x20) != 0 && jump != 1)
    					{
    						keybd_event(0x20, 0x39, 0, 0);
    						keybd_event(0x20, 0x39, 0x2, 0);
    						Thread.Sleep(5);
    					}
    				}
    			}
    		}
    		public static int readInt(int address)
    		{
    			byte[] buffer = new byte[4];
    			ReadProcessMemory(pHandle, address, buffer, 4, 0);
    			return BitConverter.ToInt32(buffer, 0);
    		}
    	}
    }

  2. #2
    DarknzNet's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Posts
    4,042
    Reputation
    563
    Thanks
    15,728
    Code:
     [DllImport("user32.dll")]
            private static extern void mouse_event(
            UInt32 dwFlags,
            UInt32 dx,
            UInt32 dy,
            UInt32 dwData,
            IntPtr dwExtraInfo
            );
    
            [DllImport("User32.Dll")]
            public static extern long SetCursorPos(int x, int y);
    
            [DllImport("User32.Dll")]
            public static extern bool ClientToScreen(IntPtr hWnd, ref POINT point);
    
            [StructLayout(LayoutKind.Sequential)]
            public struct POINT
            {
                public int x;
                public int y;
            }
    Code:
     if (GetAsyncKeyState(0x20) != 0)
                        {
                            int LocalPlayer = readInt(BaseAdressClientDLL + 0xA7D4CC);
                            int Ground = readInt(LocalPlayer + 0x100);
                            if (Ground > 0 && Ground == 257)
                            {
                                const UInt32 MOUSEEVENTF_RIGHTDOWN = 0x0020;
                                const UInt32 MOUSEEVENTF_RIGHTUP = 0x0040;
    
                                int cursorLocation = 0;
                                int cursornLocation = 0;
    
                                UInt32 x = Convert.ToUInt32(cursorLocation);
                                UInt32 y = Convert.ToUInt32(cursornLocation);
    
                                mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, new IntPtr());
                                mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, new IntPtr());
                            }
                        }
    Bind your middlemousebutton to jump in cs go
    Last edited by DarknzNet; 03-04-2016 at 04:07 AM.
     
    Member since : 08-24-2015

    Premium Member since : 01-19-2016

    Contributor : 02-27-2016 - 11.09.2017

    League of Legends Minion since : 08-24-2016

    Counter Strike: Global Offensive Minion since : 12-29-2016

    Steam Minion since : 02-11-2017

    Resigned : 04-20-2017

  3. The Following User Says Thank You to DarknzNet For This Useful Post:

    fullweeb (03-05-2016)

  4. #3
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fullweeb View Post
    I'm trying to make a bhop hack that works better than say an ahk script. All I can seem to find info on, is checking if the player is on the ground then sending a jump input. Not sure what I'm doing wrong but mine works like an ahk script, where it just seems to be spamming jump constantly and doesn't actually give good bhops. You have to strafe and everything. I want it to make it as easy as possible to bhop without writing to memory. (since I've read that'll make it detected a lot easier.)

    Also it gets stuck. Like it jumps even when you're not pressing the jump key.

    Any help would be fantastic.

    Anyway here's my code:

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System****;
    using System.Diagnostics;
    using System.Numerics;
    using System.Runtime.InteropServices;
    
    namespace bhop
    {
    	class Program
    	{
    		[DllImport("kernel32.dll")]
    		public static extern int OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
    		[DllImport("kernel32.dll")]
    		public static extern bool ReadProcessMemory(int hProcess, int lpBaseAddress, byte[] buffer, int size, int lpNumberOfBytesRead);
    		[DllImport("user32.dll")]
    		static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, UIntPtr dwExtraInfo);
    		[DllImport("user32.dll")]
    		public static extern short GetAsyncKeyState(int vKey);
    		[DllImport("user32.dll")]
    		static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
    
    		static int BaseAdressClientDLL = 0;
    		static int pHandle = 0;
    
    		const int _localPlayer = 0x00A7D4CC;
    		const int _entityList = 0x04A98154;
    		const int _mflags = 0x00000100;
    		const int FL_ONGROUND = 257;
    
    
    		static void Main(string[] args)
    		{
    
    			bool FoundCSGO = false;
    			while (true)
    			{
    				if (FoundCSGO == false)
    				{
    					foreach (Process Proc in Process.GetProcesses())
    					{
    						if (Proc.ProcessName.Equals("csgo"))
    						{
    							pHandle = OpenProcess(0x001F0FFF, false, Proc.Id);
    							foreach (ProcessModule Module in Proc.Modules)
    							{
    								if (Module.ModuleName.Equals("client.dll"))
    								{
    									BaseAdressClientDLL = (int)Module.BaseAddress;
    									int LocalPlayer = readInt(BaseAdressClientDLL + _localPlayer);
    									int jump = readInt(LocalPlayer + _mflags);
    									FoundCSGO = true;
    								}
    							}
    						}
    					}
    				}
    				else
    				{
    					int LocalPlayer = readInt(BaseAdressClientDLL + _localPlayer);
    					int jump = readInt(LocalPlayer + _mflags);
    					if (GetAsyncKeyState(0x20) != 0 && jump != 1)
    					{
    						keybd_event(0x20, 0x39, 0, 0);
    						keybd_event(0x20, 0x39, 0x2, 0);
    						Thread.Sleep(5);
    					}
    				}
    			}
    		}
    		public static int readInt(int address)
    		{
    			byte[] buffer = new byte[4];
    			ReadProcessMemory(pHandle, address, buffer, 4, 0);
    			return BitConverter.ToInt32(buffer, 0);
    		}
    	}
    }
    You should read the Player's flags as a BYTE.

    It's 1 if you are on the ground, and zero if you are in the air.

    You are currently jumping if it's zero, which means if you are in the air.

    A simple switch of operators would fix your issue.

    Check if the Player's flags ( jump ) is 1, and if so, jump.

  5. The Following 2 Users Say Thank You to WasserEsser For This Useful Post:

    fullweeb (03-05-2016),Law (03-04-2016)

  6. #4
    fullweeb's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by WasserEsser View Post
    You should read the Player's flags as a BYTE.

    It's 1 if you are on the ground, and zero if you are in the air.

    You are currently jumping if it's zero, which means if you are in the air.

    A simple switch of operators would fix your issue.

    Check if the Player's flags ( jump ) is 1, and if so, jump.
    hmm, I tried looking for some source to reference to see what you mean, and I've had no luck.

    Mind giving me an example?

    Here's what I have currently:
    Code:
    if (GetAsyncKeyState(0x20) != 0)
    {
    	int LocalPlayer = readInt(BaseAdressClientDLL + 0x00A7D4CC);
    	int Ground = readInt(LocalPlayer + 0x100);
    	if (Ground > 0 && Ground == 257)
    	{
    	        keybd_event(0x20, 0x39, 0, 0);
    		Thread.Sleep(1);
    		keybd_event(0x20, 0x39, 0x2, 0);
    	}
    }

  7. #5
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fullweeb View Post
    hmm, I tried looking for some source to reference to see what you mean, and I've had no luck.

    Mind giving me an example?

    Here's what I have currently:
    Code:
    if (GetAsyncKeyState(0x20) != 0)
    {
    	int LocalPlayer = readInt(BaseAdressClientDLL + 0x00A7D4CC);
    	int Ground = readInt(LocalPlayer + 0x100);
    	if (Ground > 0 && Ground == 257)
    	{
    	        keybd_event(0x20, 0x39, 0, 0);
    		Thread.Sleep(1);
    		keybd_event(0x20, 0x39, 0x2, 0);
    	}
    }
    Code:
    if (GetAsyncKeyState(0x20) != 0)
    {
    	int LocalPlayer = readInt(BaseAdressClientDLL + 0x00A7D4CC);
    	byte Ground = readByte(LocalPlayer + 0x100);
    	if ( Ground & ( 1 << 0 ) ) // or if ( Ground ) or if ( Ground == 1 )
    	{
    	        keybd_event(0x20, 0x39, 0, 0);
    		Thread.Sleep(1);
    		keybd_event(0x20, 0x39, 0x2, 0);
    	}
    }

  8. The Following User Says Thank You to WasserEsser For This Useful Post:

    fullweeb (03-05-2016)

  9. #6
    fullweeb's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by WasserEsser View Post
    Code:
    if (GetAsyncKeyState(0x20) != 0)
    {
    	int LocalPlayer = readInt(BaseAdressClientDLL + 0x00A7D4CC);
    	byte Ground = readByte(LocalPlayer + 0x100);
    	if ( Ground & ( 1 << 0 ) ) // or if ( Ground ) or if ( Ground == 1 )
    	{
    	        keybd_event(0x20, 0x39, 0, 0);
    		Thread.Sleep(1);
    		keybd_event(0x20, 0x39, 0x2, 0);
    	}
    }
    How would I make this readByte method?

    For instance, the readInt method looks like this:
    Code:
    public static int readInt(int address)
    		{
    			byte[] buffer = new byte[4];
    			ReadProcessMemory(pHandle, address, buffer, 4, 0);
    			return BitConverter.ToInt32(buffer, 0);
    		}
    I tried making a readByte method in a similar fashion but can't quite get it. Sorry for the noob questions haha.

  10. #7
    Jasmine's Avatar
    Join Date
    Feb 2015
    Gender
    female
    Location
    Your heart <3
    Posts
    481
    Reputation
    19
    Thanks
    1,760
    My Mood
    Amused
    Quote Originally Posted by fullweeb View Post
    How would I make this readByte method?

    For instance, the readInt method looks like this:
    Code:
    public static int readInt(int address)
    		{
    			byte[] buffer = new byte[4];
    			ReadProcessMemory(pHandle, address, buffer, 4, 0);
    			return BitConverter.ToInt32(buffer, 0);
    		}
    I tried making a readByte method in a similar fashion but can't quite get it. Sorry for the noob questions haha.
    Code:
            public static byte ReadByte(int address)
            {
                byte[] array = new byte[1];
                ReadProcessMemory(pHandle, address, array, 1, 0);
                return array[0];
            }
    Something like this should work.

  11. The Following User Says Thank You to Jasmine For This Useful Post:

    fullweeb (03-05-2016)

  12. #8
    fullweeb's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Femboy View Post
    Code:
            public static byte ReadByte(int address)
            {
                byte[] array = new byte[1];
                ReadProcessMemory(pHandle, address, array, 1, 0);
                return array[0];
            }
    Something like this should work.
    Tried it out and it's behaving the same way. Jumps once, then either doesn't jump at all or jumps after a few seconds. Once in a while it'll jump a little bit after I land. Either way, it's not bhopping.

    - - - Updated - - -

    Ok, I fixed it and got it working now. Thanks for all your help, everyone.

    For those interested, what I did was make it send keyboard inputs for a different key that was bound to jump in game, and unbound space to jump in-game. For some reason, it doesn't work if you have it the way i did.

  13. #9
    chenjunhua's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    71
    Reputation
    15
    Thanks
    7
    Quote Originally Posted by fullweeb View Post
    Tried it out and it's behaving the same way. Jumps once, then either doesn't jump at all or jumps after a few seconds. Once in a while it'll jump a little bit after I land. Either way, it's not bhopping.

    - - - Updated - - -

    Ok, I fixed it and got it working now. Thanks for all your help, everyone.

    For those interested, what I did was make it send keyboard inputs for a different key that was bound to jump in game, and unbound space to jump in-game. For some reason, it doesn't work if you have it the way i did.
    that sounds like the bug polymeme bhop has...

  14. #10
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fullweeb View Post
    Tried it out and it's behaving the same way. Jumps once, then either doesn't jump at all or jumps after a few seconds. Once in a while it'll jump a little bit after I land. Either way, it's not bhopping.

    - - - Updated - - -

    Ok, I fixed it and got it working now. Thanks for all your help, everyone.

    For those interested, what I did was make it send keyboard inputs for a different key that was bound to jump in game, and unbound space to jump in-game. For some reason, it doesn't work if you have it the way i did.
    Quote Originally Posted by chenjunhua View Post
    that sounds like the bug polymeme bhop has...
    It's an obvious bug.

    If you check for your spacebar to be pressed, and if it is and if you are on the ground, you press it again and release it.

    How should the check if you press the spacebar work now?

    If you use keybd_event, you cant use the same key you use to check if its pressed to jump.

  15. #11
    Smoke's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    11,899
    Reputation
    2661
    Thanks
    4,610
    My Mood
    Amazed
    Been over a week since last update/bump, assuming solved.

    /Closed.


    CLICK TO BUY NOW!!


    Quote Originally Posted by Liz View Post
    This is my first vouch, ever. Rapidgator account worked perfectly. Would buy in the future.

Similar Threads

  1. [Help] Help With Bhop Hack!!
    By -HYPER] in forum Counter-Strike 2 Coding & Resources
    Replies: 7
    Last Post: 11-20-2015, 03:52 PM
  2. [Help Request] Help with Crossfire hacks?
    By SkullistE1 in forum CrossFire Help
    Replies: 5
    Last Post: 07-13-2011, 02:09 PM
  3. [Help Request] i need help with the hack im using
    By kingster626 in forum Combat Arms Help
    Replies: 12
    Last Post: 06-18-2011, 10:15 PM
  4. [Help Request] I need Help With CAEU Hacks
    By ♪ςander!♪ in forum Combat Arms EU Help
    Replies: 3
    Last Post: 06-08-2011, 03:47 AM
  5. [Help Request] help with ca hacks
    By moises8 in forum Combat Arms Help
    Replies: 4
    Last Post: 05-10-2011, 05:55 PM