[Understanding] bool IsGameReadyForHook

Posts 16–30 of 37 · Page 2 of 3
Ok I coded in vb.net so im mostly vb oriented.

For this line of code
Code:
( !IsGameReadyForHook() )
Why do you put the "!"?

Cant you just put
Code:
( IsGameReadyForHook() )
So this means if the game is ready for hook, do code below.

Code:
DWORD WINAPI MainThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}
Quote Originally Posted by Shimmy- View Post
Ok I coded in vb.net so im mostly vb oriented.

For this line of code
Code:
( !IsGameReadyForHook() )
Why do you put the "!"?

Cant you just put
Code:
( IsGameReadyForHook() )
So this means if the game is ready for hook, do code below.

Code:
DWORD WINAPI MainThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}

Ok let me explain.

! is Not.

!ture = False

if( !IsGameReadyForHook() )

(converted to VB)

If IsGameReadyForHook() = False Then

(OR)

If Not IsGameReadyForHook() = True Then

(OR)

If Not IsGameReadyForHook() Then

Do u understand?

!= is Not Equal

NULL in vb is Nothing

Do u understand. it is simple.
Quote Originally Posted by Fabolous View Post
U have both for a reason. Go GOOGLE. Stop wasting other peoples time on these stupid questons on MPGH. go to MSDN for God sakes. You shouldn't be coding CA if you don't even know the basics of C++.. Hit the books, and come back later.
You wasted our own time as soon as you opened this thread.
Quote Originally Posted by Finish View Post
ok let me explain

Code:
If (The things in here Not = NULL)
      Return True;
else
      return False;
that is what it is saying.

but instead of putting the ELSE

Code:
if (Stuff){
    Return True
}
If the stuff is not right then it will just pass it. and just go to Return False

but if it is stuff is right. then it will Return as True. before it can return false.
13th posts was the first one that actually helped...

Quote Originally Posted by Shimmy- View Post
Ok I coded in vb.net so im mostly vb oriented.

For this line of code
Code:
( !IsGameReadyForHook() )
Why do you put the "!"?
[/code]
That just means "not". Like 1!=2 means 1 is not equal to 2
Im not an expert im a beginner coder and i understand this... just putting that out there. and anyone can do numpads lol just c+p CN's base then add a getasynckey function
Quote Originally Posted by Fabolous View Post


I C&P Shit?? really? GTFO. U dont even code. u just release shitty numpad hacks.
Dude read it properly atleast "HE" doesnt c+p like the rest of the choobs and just release i wasnt talking to you so shut the fuck asshole
Anyone want to answer my question above?
Yah I understood that,
but why IsGameReadyForHook() = False Then

why not IsGameReadyForHook() = True
So what is it really saying is
Code:
while( !IsGameReadyForHook) {
       Sleep(200);// CPU sleep. if u put it in ur Hook/Endscene/Reset/DIP u will make the game Pause. in a secondary thread like HackThread it will just pause that thread that will stop the game from lagging.. 
       //it is like if ur WORKING NON stop u will get Tired and start to give out and shit
       }
       main(); // The Hacks
       return 0; //Close
}
So u will wait until "IsGameReadyForHook" = True Then Call the hacks.
when the hacks are then called there is a Loop

Code:
while(true){ //or u can use while(1) 1 is true 

         //call hacks here
        Sleep(200);
}//close the loop
But it will be true for ever so it will always be repeat

So what is it really saying is
Code:
while( !IsGameReadyForHook) {
       Sleep(200);// CPU sleep. if u put it in ur Hook/Endscene/Reset/DIP u will make the game Pause. in a secondary thread like HackThread it will just pause that thread that will stop the game from lagging.. 
       //it is like if ur WORKING NON stop u will get Tired and start to give out and shit
       }
       main(); // The Hacks
       return 0; //Close
}
So u will wait until "IsGameReadyForHook" = True Then Call the hacks.
when the hacks are then called there is a Loop

Code:
while(true){ //or u can use while(1) 1 is true 

         //call hacks here
        Sleep(200);
}//close the loop
But it will be true for ever so it will always be repeat

So what is it really saying is
Code:
while( !IsGameReadyForHook) {
       Sleep(200);// CPU sleep. if u put it in ur Hook/Endscene/Reset/DIP u will make the game Pause. in a secondary thread like HackThread it will just pause that thread that will stop the game from lagging.. 
       //it is like if ur WORKING NON stop u will get Tired and start to give out and shit
       }
       main(); // The Hacks
       return 0; //Close
}
So u will wait until "IsGameReadyForHook" = True Then Call the hacks.
when the hacks are then called there is a Loop

Code:
while(true){ //or u can use while(1) 1 is true 

         //call hacks here
        Sleep(200);
}//close the loop
But it will be true for ever so it will always be repeat

So what is it really saying is
Code:
while( !IsGameReadyForHook) {
       Sleep(200);// CPU sleep. if u put it in ur Hook/Endscene/Reset/DIP u will make the game Pause. in a secondary thread like HackThread it will just pause that thread that will stop the game from lagging.. 
       //it is like if ur WORKING NON stop u will get Tired and start to give out and shit
       }
       main(); // The Hacks
       return 0; //Close
}
So u will wait until "IsGameReadyForHook" = True Then Call the hacks.
when the hacks are then called there is a Loop

Code:
while(true){ //or u can use while(1) 1 is true 

         //call hacks here
        Sleep(200);
}//close the loop
But it will be true for ever so it will always be repeat

Quote Originally Posted by Shimmy- View Post
Yah I understood that,
but why IsGameReadyForHook() = False Then

why not IsGameReadyForHook() = True
That because of the function.

Code:
bool IsGameReadyForHook(void)
{
    if( GetModuleHandleA(	"d3d9.dll"	) != NULL
     && GetModuleHandleA(	"ClientFX.fxd"	) != NULL 
     && GetModuleHandleA(	"CShell.dll"	) != NULL )
        return true;//Make it True RIGHT here Meaning is the d3d9.dll load  and ClientFX.fxd load and Cshell.dll load then return true and ur ready to add the hook/hacks

    return false;// If it is not right and those things did not load then it is not true which is false. 
    //the return function will stop the function where it is and in this case it will make the bool equal to what ever is after it.  if u return true then IsGameReadyForHook() will be true. else IsGameReadyForHook() will be false
}
Do you understand it?
You have return true first then return false, because if the "if" statement has only one instruction, you won't need the brackets.
So, its the same as doing
Code:
if(GetModuleHandleA("d3d9.dll") != NULL && GetModuleHandleA("ClientFX.fxd") != NULL && GetModuleHandleA("CShell.dll") != NULL )
{
      return true;
}
else 
{
     return false;
}
Shimmy. Dont talk if you cant do.
Shimmy
think it like this
once you return something the function is over
it only executes one line after the if so if the if isnt true it only returns false;
esle it only returns true

also
if your do
if(isGameReady()) that means if it is true
if(!isGameReady()) that means if it is false
stfu he's trying to learn and understand the code, this code returns true or false, of where ever the game is ready for the hook, so its a bool.and it checks this by seeing if cshell.dll, clientfx.fxd, and d3d9.dll, and if they are NULL it returns false, else, otherwise it will return true.
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}

IF ( GetModuleHandleA( "d3d9.dll" ) != NULL AND GetModuleHandleA( "ClientFX.fxd" ) != NULL AND GetModuleHandleA( "CShell.dll" ) != NULL )
THEN RETURN TRUE
RETURN FALSE

If it returns (anything), then the rest of the code won't execute. If you return true, the rest won't execute. But if the IF statement does return true, the rest of the code executes, and you return a false.
Quote Originally Posted by freedompeace View Post
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}

IF ( GetModuleHandleA( "d3d9.dll" ) != NULL AND GetModuleHandleA( "ClientFX.fxd" ) != NULL AND GetModuleHandleA( "CShell.dll" ) != NULL )
THEN RETURN TRUE
RETURN FALSE

If it returns (anything), then the rest of the code won't execute. If you return true, the rest won't execute. But if the IF statement does return true, the rest of the code executes, and you return a false.
didnt i explain already?
Quote Originally Posted by freedompeace View Post
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}

IF ( GetModuleHandleA( "d3d9.dll" ) != NULL AND GetModuleHandleA( "ClientFX.fxd" ) != NULL AND GetModuleHandleA( "CShell.dll" ) != NULL )
THEN RETURN TRUE
RETURN FALSE

If it returns (anything), then the rest of the code won't execute. If you return true, the rest won't execute. But if the IF statement does return true, the rest of the code executes, and you return a false.
Understood it perfectly. Thanks man.
Posts 16–30 of 37 · Page 2 of 3
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us