External bhop

Posts 16 of 6 · Page 1 of 1
External bhop
So i already made a external bhop wich basically spams 9.
But i was wondering, how do i do it the real way?
Some examples would be great aswell, thanks in advance!
Code:
while ("This is copy pasted" != "true")
{
	if (LocalPlayer::GetFlags() & FL_ONGROUND && GetAsyncKeyState(VK_SPACE) & 0x8000)
	{
		Client::SetJump(1);
 
		Sleep(50);
 
		Client::SetJump(0);
	}
 
	Sleep(1);
}
Quote Originally Posted by WasserEsser View Post
Code:
while ("This is copy pasted" != "true")
{
	if (LocalPlayer::GetFlags() & FL_ONGROUND && GetAsyncKeyState(VK_SPACE) & 0x8000)
	{
		Client::SetJump(1);
 
		Sleep(50);
 
		Client::SetJump(0);
	}
 
	Sleep(1);
}
Sleep is not a good way to go.
Quote Originally Posted by 420skid420 View Post
Sleep is not a good way to go.
Waiting neither.

Waiting just wastes processing power, and doesn't sleep the thread/process.

Infact, with this piece of code you can actually see how long it took to sleep. It will sleep for the given milliseconds, and returns how much longer it took. (So Wait(1) returns 2 if it took 3 ms)

Code:
static int Wait(int Milliseconds)
{
	SYSTEMTIME Time;
	GetSystemTime(&Time);

	int StartTime = Time.wMilliseconds;

	Sleep(Milliseconds);

	GetSystemTime(&Time);

	int SleptTime = Time.wMilliseconds - StartTime;

	return SleptTime - Milliseconds + 1;
}
Quote Originally Posted by 420skid420 View Post
Sleep is not a good way to go.
why do you think so
Quote Originally Posted by pean153 View Post
why do you think so
Sleep sleeps for >atleast< the given amount of time, which is fine for bunnyhop in my opinion.
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?