[HELP] Source code mess up?

Posts 115 of 34 · Page 1 of 3
[HELP] Source code mess up?
Ok... So basically, I was programming a hack, and when I built it, it said it was successful but when it came down to using it, I could only use the chams... Now I put FPS, speed, and hover in the hotkeys... Now I don't know if I am doing this correctly or not but this is what I did for say.. Number pad 3 hack for whatever

Code:
//I declared for speed the "bool speed = false" already as I will display later

if(GetAsyncKeyState(VK_NUMPAD3)<0)
	{
		if(speed)
		{
			PushToConsole ("BaseMoveAccel 3000.000000");
			PushToConsole ("StartAccel 500.000000");
			PushToConsole ("MaxAccel 3000.000000");
			PushToConsole ("AccelInc 6000.000000");
			PushToConsole ("WalkVel 70.000000") ;
			PushToConsole ("FRunVel 285.000000");
			PushToConsole ("BRunVel 285.000000");
			PushToConsole ("SRunVel 285.000000");
			PushToConsole ("DuckVel 50.000000");
			speed = 0;
		}
		else
		{
			PushToConsole ("BaseMoveAccel 3000.000000");
			PushToConsole ("StartAccel 3000.000000");
			PushToConsole ("MaxAccel 3000.000000");
			PushToConsole ("AccelInc 3000.000000");
			PushToConsole ("FRunVel 3000.000000");
			PushToConsole ("BRunVel 3000.000000");
			PushToConsole ("SRunVel 30000.000000");
			PushToConsole ("DuckVel 3000.000000");
			speed = 1;

}
and the start of my hack goes like this

Code:
void main()
{
while (!IsGameReadyForHook()){
Sleep(20);
}

bool NxChams = false;
bool Fps = false;
bool speed = false;
bool hover = false;
while (true)
then the code for my hacks :P I don't wanna FULLY release it but still... Could someone tell me where I went wrong? And PLEASE tell me if there is a better sleep timer
Dam, this is wrong. Learn C++, thats what i'm doing
Quote Originally Posted by Beatz View Post
Dam, this is wrong. Learn C++, thats what i'm doing
Excuse me what? How am I wrong? Can you atleast help me instead of just like you know... Just saying "This is wrong" and I am learning C++ and this is practice. Btw if this was a failed attempt at raising your postcount, you are doing really good xD
Quote Originally Posted by jonnyboy9985 View Post
Excuse me what? How am I wrong? Can you atleast help me instead of just like you know... Just saying "This is wrong" and I am learning C++ and this is practice. Btw if this was a failed attempt at raising your postcount, you are doing really good xD
stfu, I dont know much, all I can say is learn C++ FULLY FIRST!
Btw I Dont think Source Code Section If For This Kinda help Anymore...
Read The New rules
didnt you forget the speed = false and after speed = true?
Quote Originally Posted by Jack17 View Post
didnt you forget the speed = false and after speed = true?
In this case I used 0 as false and 1 as true, since it will have the same effect
Quote Originally Posted by jonnyboy9985 View Post
In this case I used 0 as false and 1 as true, since it will have the same effect
okay [too short]
Quote Originally Posted by Jack17 View Post
didnt you forget the speed = false and after speed = true?
Lol Fail....
Any number but 0 can = true & 0 = false
Can someone please help me?
Quote Originally Posted by jonnyboy9985 View Post
Ok... So basically, I was programming a hack, and when I built it, it said it was successful but when it came down to using it, I could only use the chams... Now I put FPS, speed, and hover in the hotkeys... Now I don't know if I am doing this correctly or not but this is what I did for say.. Number pad 3 hack for whatever

Code:
//I declared for speed the "bool speed = false" already as I will display later

if(GetAsyncKeyState(VK_NUMPAD3)<0)
	{
		if(speed)
		{
			PushToConsole ("BaseMoveAccel 3000.000000");
			PushToConsole ("StartAccel 500.000000");
			PushToConsole ("MaxAccel 3000.000000");
			PushToConsole ("AccelInc 6000.000000");
			PushToConsole ("WalkVel 70.000000") ;
			PushToConsole ("FRunVel 285.000000");
			PushToConsole ("BRunVel 285.000000");
			PushToConsole ("SRunVel 285.000000");
			PushToConsole ("DuckVel 50.000000");
			speed = 0;
		}
		else
		{
			PushToConsole ("BaseMoveAccel 3000.000000");
			PushToConsole ("StartAccel 3000.000000");
			PushToConsole ("MaxAccel 3000.000000");
			PushToConsole ("AccelInc 3000.000000");
			PushToConsole ("FRunVel 3000.000000");
			PushToConsole ("BRunVel 3000.000000");
			PushToConsole ("SRunVel 30000.000000");
			PushToConsole ("DuckVel 3000.000000");
			speed = 1;

}
and the start of my hack goes like this

Code:
void main()
{
while (!IsGameReadyForHook()){
Sleep(20);
}

bool NxChams = false;
bool Fps = false;
bool speed = false;
bool hover = false;
while (true)
then the code for my hacks :P I don't wanna FULLY release it but still... Could someone tell me where I went wrong? And PLEASE tell me if there is a better sleep timer

should be as follows:
Code:

if(GetAsyncKeyState(VK_NUMPAD3)<0)
	{
             speed = !speed;
		if(speed)
		{
                    //your code;
                 }
            else
                {
                  //more code;
                }
         }
Quote Originally Posted by Frit0 View Post
should be as follows:
Code:

if(GetAsyncKeyState(VK_NUMPAD3)<0)
	{
             speed = !speed;
		if(speed)
		{
                    //your code;
                 }
            else
                {
                  //more code;
                }
         }

That would make speed = false every time he pressed the hotkey.


Your missing a '}' at the end of your else statement.
Quote Originally Posted by Injection View Post



That would make speed = false every time he pressed the hotkey.


Your missing a '}' at the end of your else statement.
The variable "speed" will equal the opposite of its current value, also everything is correctly written.
Quote Originally Posted by Frit0 View Post
The variable "speed" will equal the opposite of its current value, also everything is correctly written.
Look at the end of the else statement. He either left out the last '}' or his else statement is missing it.
Stop coding T___T
Posts 115 of 34 · Page 1 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?