Question[Solved] C++ D3D Single Player

Posts 1–15 of 17 · Page 1 of 2
[Solved] C++ D3D Single Player
I need an answer... I'm currently busy with a C++ D3D hack and I need a recognition if the game is running active or not. I have been asking around and there is no such thing as an IsInGame pointer/address, so the only option would be with reading another address/pointer and I tried but still my iw5sp is crashing... I used this code [I just started with this so it could be wrong, though i dont get any Compiler errors]

Code:
bool indication()
{
        float var;
        var = *(float*)(*(int*)0x1D31404 +0xC);
        if(var != 0)
              return true;
}

void Hacks()
{
        if(indication)
        {
         //hacks
        }
}
So the method I gave you didn't work for you?

Because you do mean if you are in the game and not just that the game is running.
Else, you just check around to see after some "sticky" offsets that have an "main" value in the "lobby" or in the game.
Like, I found 1 that changes into the map name. (That I gave you.)

Or you can try to look in the range of your health. There should be an offset there that changes when you are in-game. (No, not the health, but something close to it.)
Quote Originally Posted by Jorndel View Post
So the method I gave you didn't work for you?

Because you do mean if you are in the game and not just that the game is running.
Else, you just check around to see after some "sticky" offsets that have an "main" value in the "lobby" or in the game.
Like, I found 1 that changes into the map name. (That I gave you.)

Or you can try to look in the range of your health. There should be an offset there that changes when you are in-game. (No, not the health, but something close to it.)
Problem is when im not in game its varying in numbers and once im in game it changes to a char
Quote Originally Posted by Eidolon View Post


Problem is when im not in game its varying in numbers and once im in game it changes to a char
Just read it as a string then
Or just but a try / catch (If it's possible in C++)
And then you got it all solved

Try/Catch : http://msdn.microsoft.com/en-us/libr...v=vs.100).aspx
Quote Originally Posted by Jorndel View Post
Just read it as a string then
Or just but a try / catch (If it's possible in C++)
And then you got it all solved

Try/Catch : try, catch, and throw Statements (C++)
Try-catch I know, but Ive never been good with the basics and since char doesnt support integer properties (as far as i know and its always a random number...
Quote Originally Posted by Eidolon View Post


Try-catch I know, but Ive never been good with the basics and since char doesnt support integer properties (as far as i know and its always a random number...
Some easy facts:
Chars can be converted into numbers. Think it was 16 bit. (Did it in my name faker :P)
Google found:

With the Try / Catch you could use the catch to notify when it's in-game | out-game.

And what else I was to say I forgot :P
if you hook the engine, you dont have problems with isingame
just hook renderscene, can be found on string
Quote Originally Posted by cardoow View Post
if you hook the engine, you dont have problems with isingame
just hook renderscene, can be found on string
What do you mean by this? [as I said, I dont have much experience with this ollydbg/C++]
Quote Originally Posted by Eidolon View Post


What do you mean by this? [as I said, I dont have much experience with this ollydbg/C++]
Means you have to access the game engine
And you read the render info from there.

What he mostly like meant.

Like it have to render the items etc.
No, should be this @Eidolon:
Code:
bool indication()
{
    return *(int*)0x1D31404 == 0;
}
Maybe I should've been more clearer. When you are not in-game, those DVAR pointers point to nothing.
Quote Originally Posted by master131 View Post
No, should be this @Eidolon:
Code:
bool indication()
{
    return *(int*)0x1D31404 == 0;
}
Maybe I should've been more clearer. When you are not in-game, those DVAR pointers point to nothing.
In combination with
Code:
if(!indication)
I guess?
Quote Originally Posted by Eidolon View Post


In combination with
Code:
if(!indication)
I guess?
Yep.
Code:
if(!indication){
   //Your stuff here
}
Yeah, or you could reverse the logic and rename the function to make it more clearer.

Code:
bool IsInGame()
{
    return *(int*)0x1D31404 != 0;
}

void MyThing()
{
    if(IsInGame())
    {
        // Do crap here.
    }
}
Ok great I used @master131's tip but game is still crashing, so I will need someone (with brains and honor so he doesn't copy my base) to have a look at my code what I did wrong...
Quote Originally Posted by Eidolon View Post
Ok great I used @master131's tip but game is still crashing, so I will need someone (with brains and honor so he doesn't copy my base) to have a look at my code what I did wrong...
What about you attach your code here, or part of it, so everyone who want to help can take a look? Unless you don't want to share your work to the public, what I would understand as well... Anyway, it's your call
Posts 1–15 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us