A Bit Help With C++ Pointers

Posts 1–6 of 6 · Page 1 of 1
A Bit Help With C++ Pointers
Hi all,
I'm not really active in that forum,but i looking some thread to take help.
So i have a problem in C++ and i hope you guys can help me a bit :/
So i wanna make a teleport hack in D3D for a game.Teleport need Coordinates and i have them!
But the problem is script them.I wanna make that




into C++....

I tried make that

Code:
float *GetCurrentZPointer()
{
	DWORD step = BaseAddr;

	for(int i=0; i<sizeof(Offsets)/4; i++)
	{
		GiveOut(step);
		if(step != 0 &&);
		{
			step = *(DWORD*)step + Offsets[i];
		}
		else
		{
			step = 0;
			break;
		}
	}

	return (float*)step;
}



		float *Z = GetCurrentPointer = (Base + Zoffset + Zoffset1 + Zoffset2 + Zoffset3 + Zoffset4);

		if (CH_TLobby == 1)
		{
		
		*Z = 10000;
		}
but it's says error about GetCurrentPointer...But i don't know what else to do,cause i'm sure that is correct..

Then i tried
Code:
DWORD* z = (DWORD*) (*(DWORD*) (*(DWORD*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(TeleBase)+ Off1)+ Off2)+ Off3)+ Off4)+ Zoff);

if (CH_TLobby ==1)
{
z = 10000;
}
and it's says error with GiveOut....but i don't know what to do...i think it need a header but which?

Thank if someone can help me and sorry for my fail english :/
trying

whats the type of GetCurrentPointer? DWORD?

this might work but not 100%
float *Z = (float*) (GetCurrentPointer = (Base + Zoffset + Zoffset1 + Zoffset2 + Zoffset3 + Zoffset4));
So much of that code you posted is wrong :/

if(step != 0 &&);

Like wut.
Hm you could probaby do it like this :
DWORD Base = <Starting/Base Address>
DWORD first = (DWORD)(*(DWORD*)Base + 0x624);
DWORD thesecond = (DWORD)(*(DWORD*)thefirst + 0x214);
and so on ..
Not sure what you're trying to achieve exactly with such a deep multi-level pointer but I think your looking for something like this?

Code:
int ReadPointer(int address, int offset = 0)
{
    return *(int*)address + offset;
}

void SomeCrap()
{
    int myPtr = ReadPointer(0x27601E88, 0x688);
    myPtr = ReadPointer(myPtr, 0x100);
    myPtr = ReadPointer(myPtr, 0xE0);
    myPtr = ReadPointer(myPtr, 0x214);
    myPtr = ReadPointer(myPtr, 0x624);
}
If you really need to use DWORDs then just replace the int keyword with DWORD.
DWORD's would be much preferable to ints, there is no need for a signed int when addresses start at 0, and have a range higher than that of a signed int.
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us