AngryHelpDelay on bhop

Posts 1–9 of 9 · Page 1 of 1
Delay on bhop
Hi. I'm internal and I'm trying to add some delay / random delay to bhop and I have absolutely no idea how to. Basically here is my code for my autohop
Code:
void CMiscHacks::AutoJump(CUserCmd *pCmd)
{
	
	
	if (pCmd->buttons & IN_JUMP && GUI.GetKeyState(VK_SPACE))
	{
		int iFlags = hackManager.pLocal()->GetFlags();
		if (!(iFlags & FL_ONGROUND))
			pCmd->buttons &= ~IN_JUMP;
	
		
	}
}
Obviously since I'm internal I can't just use sleep or wait( think I can't use wait not sure)

Basically just asking for spoonfeed


angry emote
Use a timer and a condition instead of sleep.
Quote Originally Posted by WasserEsser View Post
Use a timer and a condition instead of sleep.
Please ignore that it is blatantly copy pasted

Code:
	static clock_t start_t = clock();
	double timeSoFar = (double)(clock() - start_t) / CLOCKS_PER_SEC;
	if (timeSoFar < 0.25)
		return;


	start_t = clock();
Is this something similar to what you mean? Sorry if I offend you with my lack of c++ knowledge but what I tried to do is
Code:
	static clock_t start_t = clock();
	double timeSoFar = (double)(clock() - start_t) / CLOCKS_PER_SEC;
	if (timeSoFar < 0.25)
		return;

	if (pCmd->buttons & IN_JUMP && GUI.GetKeyState(VK_SPACE))
	{
		int iFlags = hackManager.pLocal()->GetFlags();
		if (!(iFlags & FL_ONGROUND))
			pCmd->buttons &= ~IN_JUMP;
	
		start_t = clock();
Should I do
Code:
if (pCmd->buttons & IN_JUMP && GUI.GetKeyState(VK_SPACE) && timeSoFar > 0.25))
?
Or just stick to what I did above.
Should I implement it with
Code:
			pCmd->buttons &= ~IN_JUMP;
?
Quote Originally Posted by xln1 View Post
Please ignore that it is blatantly copy pasted

Code:
	static clock_t start_t = clock();
	double timeSoFar = (double)(clock() - start_t) / CLOCKS_PER_SEC;
	if (timeSoFar < 0.25)
		return;


	start_t = clock();
Is this something similar to what you mean? Sorry if I offend you with my lack of c++ knowledge but what I tried to do is
Code:
	static clock_t start_t = clock();
	double timeSoFar = (double)(clock() - start_t) / CLOCKS_PER_SEC;
	if (timeSoFar < 0.25)
		return;

	if (pCmd->buttons & IN_JUMP && GUI.GetKeyState(VK_SPACE))
	{
		int iFlags = hackManager.pLocal()->GetFlags();
		if (!(iFlags & FL_ONGROUND))
			pCmd->buttons &= ~IN_JUMP;
	
		start_t = clock();
Should I do
Code:
if (pCmd->buttons & IN_JUMP && GUI.GetKeyState(VK_SPACE) && timeSoFar > 0.25))
?
Or just stick to what I did above.
Should I implement it with
Code:
			pCmd->buttons &= ~IN_JUMP;
?
Lol, don't accuse @WasserEsser of copy paste... He is one of the best c++ programmers on this site...
Quote Originally Posted by ImWhacky View Post
Lol, don't accuse @WasserEsser of copy paste... He is one of the best c++ programmers on this site...
Lol, don't accuse @xln1 of accusing @WasserEsser for copy pasting, when he never did accuse him of anything.
Quote Originally Posted by gtaplayer2 View Post
Lol, don't accuse @xln1 of accusing @WasserEsser for copy pasting, when he never did accuse him of anything.
Is he not accusing him at the first line in his post?
Quote Originally Posted by xln1 View Post
Please ignore that it is blatantly copy pasted
Quote Originally Posted by ImWhacky View Post
Is he not accusing him at the first line in his post?
He is pointing out that his code is copy pasted from elsewhere, not that wasseresser is copy pasting??
Quote Originally Posted by gtaplayer2 View Post
He is pointing out that his code is copy pasted from elsewhere, not that wasseresser is copy pasting??
Ok i interpreted it wrong, that's my bad
Been over a week since last update/bump after answers, assuming solved.

/Closed.
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?