Code for a spacebar fly hack!??

Posts 115 of 38 · Page 1 of 3
Code for a spacebar fly hack!??
Does anyone know of a code that allows you to fly when you hold space bar and when you let go of the space bar you stop flying? i have a fly hack were you press space bar to fly and press it again to stop flying but its gay! So could someone give me advicce thanks

-Zane
This is a controllable fly hack for your hotkey hack!

Add it to your loop.
Code:
	if(GetAsyncKeyState(VK_SPACE)<0)
		PushToConsole( "PlayerGravity 800" );
	else
		PushToConsole( "PlayerGravity -800" );
Quote Originally Posted by Braco22 View Post
This is a controllable fly hack for your hotkey hack!

Add it to your loop.
Code:
	if(GetAsyncKeyState(VK_SPACE)<0)
		PushToConsole( "PlayerGravity 800" );
	else
		PushToConsole( "PlayerGravity -800" );

That's what he already has. To get it while you hold down spacebar you're probably going to need a varialbe and a while.

i.e aircoding ftw (i gotta go to school so i can't test)

add just below your #includes
Code:
int IsFlyingOn = 0;
Then in your main.

Code:
If(GetAsyncKeyState(VK_SPACE)<0){
IsFlyingOn=1;
}
else{
IsFlyingOn = 0;
}

If(IsFlyingOn==1){
PushToConsole("PlayerGravity -800");
}
else{
PushToConsole("PlayerGravity 800");
}
Like I said, i didn't test this i just wrote it out then. So have fun
This is simple to do. I don't know why you even bothered to help him.

Just another example for someone to c&p.

let people figure it out on their own for a chance.
They will learn more.
@J-Deezy

Why make it so complicated? Mine works great.

This explains it all:
Code:
If press spacebar, fly
else
glide back to ground
btw GetAsync is a keydown function. Checks if the key is being pressed/held down.
Quote Originally Posted by Braco22 View Post
@J-Deezy

Why make it so complicated? Mine works great.

This explains it all:
Code:
If press spacebar, fly
else
glide back to ground
btw GetAsync is a keydown function. Checks if the key is being pressed/held down.
No, GetAsyncKeyState is a key "action" function. Checks if anything at all has happened to the key...

Code:
<0)

means if anything has happened to the key.
Code:
&1

means its been pressed 1 time.
Quote Originally Posted by J View Post
No, GetAsyncKeyState is a key "action" function. Checks if anything at all has happened to the key...

Code:
<0)

means if anything has happened to the key.
Code:
&1

means its been pressed 1 time.
Wrong

&1 is used to check to see if the key has been pressed since the last time you called GeyAsyncKeyState. It only works once per press.

< 0 or & 0x8000 is used to check if the key is down.
Quote Originally Posted by Braco22 View Post
@J-Deezy

Why make it so complicated? Mine works great.

This explains it all:
Code:
If press spacebar, fly
else
glide back to ground
btw GetAsync is a keydown function. Checks if the key is being pressed/held down.
Because J-Deezy is fucking boss..
Quote Originally Posted by whit+ View Post
Because J-Deezy is fucking boss..
chyeeah I am!

Shame that pseudocode was such a fail. I really shouldn't attempt it when I'm just a beginner myself :P. I think I got it fixed though.
Quote Originally Posted by Jason View Post


chyeeah I am!

Shame that pseudocode was such a fail. I really shouldn't attempt it when I'm just a beginner myself :P. I think I got it fixed though.
Atleast your learning without the intent to release...

Thumbs Up for Gay Kitty Kat --->
Quote Originally Posted by whit+ View Post
Atleast your learning without the intent to release...

Thumbs Up for Gay Kitty Kat --->
One day I will release, when I know how to make everything (or 99% of the important things, not just PTC) by myself. Gotta give Blood a big props for giving me a class today, I got completely mindfucked but I actually understand dllmain now
Quote Originally Posted by Jason View Post


One day I will release, when I know how to make everything (or 99% of the important things, not just PTC) by myself. Gotta give Blood a big props for giving me a class today, I got completely mindfucked but I actually understand dllmain now
And classes shall continue /yea
lol, what a c/p. just learn c++ and come back. and don't c/p, it will ruin your rep, plus it will make everyone hate you.
Quote Originally Posted by DeadLinez View Post
lol, what a c/p. just learn c++ and come back. and don't c/p, it will ruin your rep, plus it will make everyone hate you.
lol calling other people c+p when ur a C+p to
You don't even need basic C++ for this even
/yea
Posts 115 of 38 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?