How do functions work. Part1
This is a small tutorial on how functions actually work.
______________________________________________
Walk under water
Code:
*(float*)(Wuw) = 0;
Walk under water value is random for each map, some maps have '100' as value,others have '0' as value.
By changing this to '0' it will be the value of 0 everywhere.
It is water height.
So if we turn it to '0' it will set the water height to '0'.
But since there is water in every map you just will walk under water,it does not turn the water off.
It can also be turned around,if you set the value higher then it normally is in the map,for example '1000' you will swim,but since its unther water you will drown.
______________________________________________
______________________________________________
No water
Code:
*(int*)(Nowater) = 0;
Why the value of '0' you think?
You can change this to,but the value of 0 is a number that turns it off.
water is enabled? 1 -- true | 0 -- false
So if we put back to 1 it probably will turn on.
But its better to take a higher number since it does not always function with 1.
______________________________________________
______________________________________________
Superjump
Code:
*(float*)(PlayerPtr+OFS_Z) = 1000;
Well,this is one of the most populair & common functions you will find in hacks.
Why OFS_Z?
Well,ofs z is actually the hight of your character,if the normal value of a character in a map would be '37',you can change this by using the player adress + the hight adress(OFS_Z) togetther,this will make your character jump to the writen hight(1000 in this case)
It will jump from the floor(not the map floor) 1000 high,many ppl mistake this with the floor hight(the ground you run on).
So they take 500 for example,if you take that and you go to khali,you will end up unther the floor.
This is can also be turned around,if you make the value '=-100;' then you will end up unther the floor,this we call dig.
______________________________________________
______________________________________________
Virtual Dig
Code:
*(float*)(PlayerPtr+VirtualDig) = -100;
Again,this is a dig function,What is the diffrence between this and the normal dig?
Well,to answer on that question you have to inspect the addies first,OFS_Z is not the same as VirtualDig/Jump Adress,those are 2 totaly diffrent functions,but the same purpose.
Virtual dig make you dig also,but only you see it,for other players you are on the normal ground,so its actually a 'fixed' version of dig.
This can also be turned to virtual jump, just put the value to '= 2000;'
This is also undetected for other players
______________________________________________
______________________________________________
Teleport
Code:
if(TelePort){
int x,y,z;
float _X = 0.0; float _Y = 0.0; float _Z = 0.0;
if(dwPlayerPtr!=0){
_X = *(float*)(dwPlayerPtr+OFS_X);
_Y = *(float*)(dwPlayerPtr+OFS_Y);
_Z = *(float*)(dwPlayerPtr+OFS_Z);
if(GetAsyncKeyState(VK_F10)&1)
{
x = _X;
y = _Y;
z = _Z;
}
if(GetAsyncKeyState(VK_F11)&1)
{
*(float*)(dwPlayerPtr+OFS_X) = x;
*(float*)(dwPlayerPtr+OFS_Y) = y;
*(float*)(dwPlayerPtr+OFS_Z) = z;
}
}
}
What is teleport now exactly?
Well,its very easy to understand.
First of all we got the function that saves our cordinates.
Code:
float _X = 0.0; float _Y = 0.0; float _Z = 0.0;
Then ofcourse we have the function that save the postion in '_X','_Y','_Z'
Code:
_X = *(float*)(dwPlayerPtr+OFS_X);
_Y = *(float*)(dwPlayerPtr+OFS_Y);
_Z = *(float*)(dwPlayerPtr+OFS_Z);
As you see its PlayerPtr + OFS_Z also used in superjump.
Then we have the save function.
Code:
if(GetAsyncKeyState(VK_F10)&1) /*When we press F10*/
{
x = _X; /*This makes our '_X' save to the integer of 'x' */
y = _Y;
z = _Z;
}
Then we have the teleport function
Code:
if(GetAsyncKeyState(VK_F11)&1) /*When we press F11*/
{
*(float*)(dwPlayerPtr+OFS_X) = x;/*We go to our 'x' integer that saved the position we where when you pressed F10*/
*(float*)(dwPlayerPtr+OFS_Y) = y;
*(float*)(dwPlayerPtr+OFS_Z) = z;
}
______________________________________________
______________________________________________
Speed
Code:
*(float*)(Speed) = 1000;
Well,speed is also a very populair function.
This is probably one of the most easy functions you will find.
The value '1000' is the speed you will go.
The normal speed value is '96.7' if i am right.
When you change the addy to 1000,96.7 will dissapear and get you to the speed of 1000.
I also recommend you when turn this on to add 'No fall damage',Since this speed will get you falling in urban ops,battle group that will kill you.
______________________________________________
______________________________________________
No fall damage
Code:
*(float*)(PlayerPtr+OFS_Nfd) = - 20000;
What is no fall damage?
If you fall ingame,you will lose damage,with this function you wont lose any hitpoints.
When we do the PlayerPtr + OFS_Nfd and we do that '= -20000;' you can survive a fall up to 20020 feet.
20 is the maximum hight you can fall without dieng,ofc you will lose hitpoints.
If we would change the value from '= -20000;' to '= -2300;' and our superjump hight would be '2000' we would not die either.
If you make the value of superjump to '2500' and the value from nfd would be '= -2400;' you would die instantly after the jump.
______________________________________________
More to come.