hack not working [source code included]

Posts 1–8 of 8 · Page 1 of 1
hack not working [source code included]
ok, so i just learned alot of c++ in the past few months, and i tryed to make a DLL hack. here is the code:
Code:
#include <windows.h>
#include <stdio.h>
#define OFS_Z 0x00102D8
#define ADR_PLAYERPTR 0x00D284E8
#define OFS_NFD 0x00103A4

void superjump()
{
	while(1)
	{
		*(float*)(dwPlayerPtr+OFS_NFD)=-20000; //NFD
		if(GetAsyncKeyState(VK_CONTROL)&1)
		{
			DWORD dwPlayerPtr=*(DWORD*)ADR_PLAYERPTR;
			if(dwPlayerPtr!=0)
			{
				*(float*)(dwPlayerPtr+OFS_Z)=500; //SUPERJUMP
			}
		}
	}
}

BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved) /*Basic Function. */
{
   if(dwReason == DLL_PROCESS_ATTACH) /*Here is "tested" if the dll has been attached.*/
   {
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)superjump, NULL, NULL, NULL); //create the new Thread (run superjump)
   }
return TRUE;
}
for some reason it wont let me superjump. are the addies outdated? any help appreciated
RESOLVED - THANKS CYBER 4 ADDYS
CLOSE
addys seems rights, but even my hack dont work (?) I should make a thread too... Mine just warrock closes...
PlayerPointer is Old...
Quote Originally Posted by CyberRazzer View Post
PlayerPointer is Old...
nope... updated to yours lol
its not working because while is not a function you can user by hooking, only if you define your while

if you make it like this it will work
Remove (while)
Code:
#include <windows.h>
#include <stdio.h>
#define OFS_Z 0x000102D8
#define ADR_PLAYERPTR 0xA71030
#define OFS_NFD 0x000103A4

void superjump()
	{
		*(float*)(dwPlayerPtr+OFS_NFD)=-20000; //NFD
		if(GetAsyncKeyState(VK_CONTROL)&1)
		{
			DWORD dwPlayerPtr=*(DWORD*)ADR_PLAYERPTR;
			if(dwPlayerPtr!=0)
			{
				*(float*)(dwPlayerPtr+OFS_Z) = 500; //SUPERJUMP
		}
	}
}

BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved) /*Basic Function. */
{
   if(dwReason == DLL_PROCESS_ATTACH) /*Here is "tested" if the dll has been attached.*/
   {
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)superjump, NULL, NULL, NULL); //create the new Thread (run superjump)
   }
return TRUE;
}
Code:
#include <windows.h>
#include <stdio.h>
#define OFS_Z 0x00102D8
#define ADR_PLAYERPTR 0x00D284E8
#define OFS_NFD 0x00103A4

void superjump()
{
	for(;;)
	{
		*(float*)(dwPlayerPtr+OFS_NFD)=-20000; //NFD
		if(GetAsyncKeyState(VK_CONTROL)&1)
		{
			DWORD dwPlayerPtr=*(DWORD*)ADR_PLAYERPTR;
			if(dwPlayerPtr!=0)
			{
				*(float*)(dwPlayerPtr+OFS_Z)=500; //SUPERJUMP
			}
		}
	}
}

BOOL WINAPI DllMain(HINSTANCE module, DWORD dwReason, LPVOID lpvReserved) /*Basic Function. */
{
   if(dwReason == DLL_PROCESS_ATTACH) /*Here is "tested" if the dll has been attached.*/
   {
        CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)superjump, NULL, NULL, NULL); //create the new Thread (run superjump)
   }
return TRUE;
}
Best Regards,
Yazzn™
well it seems that the "dwPlayerPtr"" is giving you the prob it needs to be able to be defined
this was fixed a few days ago.. read the whole post
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us