I always see this useless stuff posted by nuubs who dont know much about C++
The DWORD after every if(dwPlayer != 0)
Just make it to your PlayerPointer adress
#include <stdio.h>
#include <windows.h>
// Pointers
#define PlayerPointer 0x00C62388
#define ServerPointer 0xB5D0F8
// Offsets
#define OFS_Z 0x000102D8
#define OFS_NORECOIL1 0x001C
#define OFS_NORECOIL2 0x0020
#define OFS_NORECOIL3 0x0024
#define OFS_NFD 0x103A4
HANDLE Warrock;
DWORD *ingame= (DWORD*)PlayerPointer;
DWORD *outgame= (DWORD*)ServerPointer;
void NoRecoil()
{
DWORD dwPlayerPtr = *(DWORD*)PlayerPointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_NORECOIL1) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL2) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL3) = 0;
}
}
void superjump()
{
if(GetAsyncKeyState(VK_CONTROL)&1) // Press CTRL To SuperJump
{
DWORD dwPlayerPtr = *(DWORD*)PlayerPointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + OFS_Z) = 500; //Height of Jump
}
}
}
void NoFall()
{
DWORD dwPlayerPtr = *(DWORD*)PlayerPointer;
*(float*)(dwPlayerPtr + OFS_NFD) = -20000; //Fall Height
}
void Close()
{
if (GetAsyncKeyState(VK_F9))
{
exit(1);
}
}
void Hacks()
{
for(;
{
superjump();
NoRecoil();
NoFall();
Close();
Sleep(200);
}
}
BOOL WINAPI DllMain(HMODULE mod, DWORD DWORD_GRUND, LPVOID res)
{
if (DWORD_GRUND==DLL_PROCESS_ATTACH)
{
}
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Hacks , 0, 0, 0);
}
return TRUE;
Creditz
SeptFicelle (for idea for puytting pointers and all that)
is that better
Need help in vb pm me and il help u
Thanks, all though you should listen AeroMan on the DWORD subject. I agree 100%, it allows the project to be cleaner. The best way to go is to declare you pointers at the top that way you don't declare in every function. Also, you could go neat freak and put your addresses, pointers, and offsets in seperate header files. =) I'm working on a video at the moment that could help you clean this up a bit. I'll give you examples here real quick while I'm waiting on my mac to eliminate that annoying hypercam crap. =P
(In my video I managed to embarass myself, I'll let the pro-coders tell you where at though. =P)
We will use the start up of your code to explain.
The red is what we're focusing on. Basically the idea is to make the code as clean but as direct as possible. So, let's get clean and declare our pointers.Code:HANDLE Warrock; DWORD *ingame= (DWORD*)PlayerPointer; DWORD *outgame= (DWORD*)ServerPointer; void NoRecoil() { DWORD dwPlayerPtr = *(DWORD*)PlayerPointer; if(dwPlayerPtr != 0){ *(float*)(dwPlayerPtr+OFS_NORECOIL1) = 0; *(float*)(dwPlayerPtr+OFS_NORECOIL2) = 0; *(float*)(dwPlayerPtr+OFS_NORECOIL3) = 0; } }
So instead of it saying *ingame or *outgame it will say Player or Server. This is not only more directly related to the actual objects we are using but more usefull to us in the end, and here is how.Code:HANDLE Warrock; DWORD* Player = (DWORD*) PlayerPointer; DWORD* Server = (DWORD*) ServerPointer;
Now you don't have that annoying DWORD* in every function. You will of course have to change the spots that said *ingame to Player and *outgame to Server. But hey, it's a simple change and worth it in the end. It will produce a less laggy product in the end. Hope this helped you out. =)Code:void NoRecoil() { if ( Player != 0 ) { *(float*) ( Player + OFS_NORECOIL1 ) = 0; *(float*)( Player + OFS_NORECOIL2 ) = 0; *(float*)( Player + OFS_NORECOIL3 ) = 0; } }
Last edited by SeptFicelle; 11-03-2010 at 10:42 PM.
You see, maddness, as we know, is like gravity, all it takes is a little push.
-------------------------------------
Current Focus: C#
Languages Known: C++, C#, F#, .NET
Specialty: Inspection Of Algorithms
Schooling Focus: Astrobiology
-------------------------------------
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/overallsig.png[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/userbar97571.gif[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/skypeuser5gu.png[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/3dsmax9userot0.gif[/IMG]
You see, maddness, as we know, is like gravity, all it takes is a little push.
-------------------------------------
Current Focus: C#
Languages Known: C++, C#, F#, .NET
Specialty: Inspection Of Algorithms
Schooling Focus: Astrobiology
-------------------------------------
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/overallsig.png[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/userbar97571.gif[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/skypeuser5gu.png[/IMG]
[IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/3dsmax9userot0.gif[/IMG]