[Need Help] What am I doing wrong?
I am trying to start hacking, and I just want to see if it works.
Here's the code, why doesn't it work in-game, I have the recent address/byte.
Please tell me what I am doing wrong there, and please hesitate to flame me xD
Code:
#include <windows.h>
int HackOn = 0;
int HackMax = 10;
bool test = false;
#define ADDR_SBULLLETS 0x3740DDB6
void Main (void)
{
while(1)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
test = (!test);
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
HackOn ++;
if(HackOn == HackMax) HackOn = 0;
}
if(test)
{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x90\x90\x90", 3 );
}else{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
}
}
}
DWORD WINAPI Lesson (LPVOID)
{
Main();
return 1;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
}
return TRUE;
}
(Of course it's not my source code, I'm just starting, when I'm done learning I will make my own and not c/p.)
Here's the code, why doesn't it work in-game, I have the recent address/byte.
Please tell me what I am doing wrong there, and please hesitate to flame me xD
Code:
#include <windows.h>
int HackOn = 0;
int HackMax = 10;
bool test = false;
#define ADDR_SBULLLETS 0x3740DDB6
void Main (void)
{
while(1)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
test = (!test);
}
if(GetAsyncKeyState(VK_NUMPAD2)&1)
{
HackOn ++;
if(HackOn == HackMax) HackOn = 0;
}
if(test)
{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x90\x90\x90", 3 );
}else{
memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
}
}
}
DWORD WINAPI Lesson (LPVOID)
{
Main();
return 1;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
}
return TRUE;
}
(Of course it's not my source code, I'm just starting, when I'm done learning I will make my own and not c/p.)



