[HELP] Source code mess up?
I do it like so [php]
void main()
{
bool hack = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD0) < 0){ //NX Chams
if( hack == false ){
PushToConsole("SkelModelStencil 1");
hack = true;
} else {
PushToConsole("SkelModelStencil 0");
hack = false;
}
Sleep(200);
}
}
}[/php]
void main()
{
bool hack = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD0) < 0){ //NX Chams
if( hack == false ){
PushToConsole("SkelModelStencil 1");
hack = true;
} else {
PushToConsole("SkelModelStencil 0");
hack = false;
}
Sleep(200);
}
}
}[/php]
No offense dude, but thats a really horrible way to do it.
like Frit0 said, would solve everything. Where speed is defined as a boolean value.
So when its true, this instruction makes the bool value to its opposite. Ergo, it will become false
When true, make it false
When false, make it true.
So, when you do press numpad 1 to turn on your hack, Speed (that was false) will turn into Speed(thats true) So now, if you have a check for it being true, you can run your console command and completely eliminate your else statement. Its a much more efficient and cleaner way to do it.
Code:
Speed = !Speed
So when its true, this instruction makes the bool value to its opposite. Ergo, it will become false
When true, make it false
When false, make it true.
So, when you do press numpad 1 to turn on your hack, Speed (that was false) will turn into Speed(thats true) So now, if you have a check for it being true, you can run your console command and completely eliminate your else statement. Its a much more efficient and cleaner way to do it.
Alright now you are BOTH wrong... I run this in game, and I come up with no results... Fps doesn't show up, nx chams dont, speed doesn't either, and I replaced it with your guys' codes and NEITHER worked :P What is the code for reacting on the pressing of a button?
This should work perfectly
Code:
if(GetAsyncKeyState(VK_NUMPAD3)<0)
{
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;//false
}
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;//true
}
[php]
bool hack = false;
if(GetAsyncKeyState(VK_NUMPAD1){
hack = !hack
}
if(hack){
//On
}else{
//Off
}
[/php]
bool hack = false;
if(GetAsyncKeyState(VK_NUMPAD1){
hack = !hack
}
if(hack){
//On
}else{
//Off
}
[/php]
void meHackThread(){
DECLARE FUNCTION GLOBALS
while(1){//a while loop to keep checking hotkeys and what hacks are on
if(GetAsyncKeyState(VK_F1)&1){myvare = !myvar;}//Create Hotkey
if(myvar){
dohack;
}
else {
donorm;
}
Sleep(50);//give the loop so well deserved rest
}//close loop
}//close function
and whoever said that 0 can be false or true
shut up 0 = false true = 1....
omg wheres the edit key!
btw sorry i misread your post
DECLARE FUNCTION GLOBALS
while(1){//a while loop to keep checking hotkeys and what hacks are on
if(GetAsyncKeyState(VK_F1)&1){myvare = !myvar;}//Create Hotkey
if(myvar){
dohack;
}
else {
donorm;
}
Sleep(50);//give the loop so well deserved rest
}//close loop
}//close function
and whoever said that 0 can be false or true
shut up 0 = false true = 1....
omg wheres the edit key!
btw sorry i misread your post
What about the fact that I need to press the button REALLY fast in order to activate it? And I thought it doesn't matter what way you order it? Like normal first, then hack?
This thread is closed for replies.
Similar Threads
Combat Arms Hack Coding / Programming / Source Code[HELP] Source Code Help
10 WarRock Hack Source CodeNeed Help (SOURCE CODE)UM 4 C++/C ProgrammingHelp with source code! Easy fast scope bot!
22 General Game HackingCan anyone help me get combat arms source codes that arent patched?NI 2 C++/C ProgrammingNeed Help please(about source codes) 5

