Some basic c++

Posts 1–7 of 7 · Page 1 of 1
Some basic c++
Hey guys,

I have some experience in java and I'm trying to understand c++.
But there are some basic things that I don't understand yet, and I'm hoping you guys could help me out here.

the * is a pointer, so what I understand a addresses in warrock (0x0000000) is the address for a value, right?
So what the hacks do is change some values in warrock through accessing the pointer addresses.

Code:
#define Adr_PlayerPTR    0x00000000 // This is just the address value
DWORD dwPlayerPtr = *(DWORD*)Adr_PlayerPTR; // Now we made it a actual pointer
Now, what I don't understand what does *(DWORD*) mean?
What I understand how you create a pointer is like:
Code:
DWORD *dwPlayerPtr = Adr_PlayerPTR; // dwPlayerPtr  is now pointing to the location of the value
Does this the same or am I totally doing it wrong?


Now something else, I've seen people using:
Code:
*(float*)(dwPlayerPtr + Ofs_Z) = 1000;
This is superjump?

Once again, the *(DWORD*) but now as a float. ..Basically why?
U Should read more about pointers now u are defining the pointer its like ** , using float is becouse that what wr use to access the addie ..

DWORD dwPlayerPtr = *(DWORD*)Adr_PlayerPTR; // Ur just setting the pointer in dwplayerptr

not meantion float is for 0.00 , so ofs_z has to be floar and if u search on wr dump u may find that too .
DWORD Player = *(DWORD*)ADR_PlayerPointer;//or you can change
DWORD Server = *(DWORD*)ADR_ServerPointer;//
Float is a value with some digits behind the comma.
basically with the super jump thing you are setting the Float behind that memory address to in this case 1000.
I dont think anyone understands his question. I think this is what he means:

Why use this?
DWORD dwPlayerPtr = *(DWORD*)Adr_PlayerPTR;

And why not this?
DWORD *dwPlayerPtr = Adr_PlayerPTR;
bro when you use ollybg you'll see why
the best Thing make it like so DWORD PlayerCheck = *reinterpret_cast<DWORD*>(ADR_PlayerPointer);// its only a pointer check^^ , I think DWORD = 4bytes , if you check the addy in ollybg program , you'll see the addy MOVE,EAX DWORD blablabla thats why


MFG

EXO
Quote Originally Posted by k1lguy View Post
Hey guys,

I have some experience in java and I'm trying to understand c++.
But there are some basic things that I don't understand yet, and I'm hoping you guys could help me out here.

the * is a pointer, so what I understand a addresses in warrock (0x0000000) is the address for a value, right?
So what the hacks do is change some values in warrock through accessing the pointer addresses.
Well the 0x0000000 is an adress, each adress represents a part of a function, each adress has a value, chaning this valyue will result in a change ingame.

Code:
#define Adr_PlayerPTR    0x00000000 // This is just the address value
DWORD dwPlayerPtr = *(DWORD*)Adr_PlayerPTR; // Now we made it a actual pointer
Now, what I don't understand what does *(DWORD*) mean?
What I understand how you create a pointer is like:
Code:
DWORD *dwPlayerPtr = Adr_PlayerPTR; // dwPlayerPtr  is now pointing to the location of the value
This basicly stores the playerpointer inside dwPlayerPtr (the playerpointer from the game is a DWORD so you should store it in a dword. <- if that makes sence

Does this the same or am I totally doing it wrong?


Now something else, I've seen people using:
Code:
*(float*)(dwPlayerPtr + Ofs_Z) = 1000;
This is superjump?
Yes, you modify the adress (offset in this case) to your value, so the game gets this value and moves the player to it, since you modified it it sets the player to your value (which is superjump in this case).

Once again, the *(DWORD*) but now as a float. ..Basically why?
Because the original adress is a float, (0.0F)
Fundamental Types (C++)
i hope this helps
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us