Can someone look at my base code?
Hello,
I have some background in obj-c and vb.NET. Now trying to learn C++ by making some warrock hacks. If they work i will post them on mpgh ofcourse!
The first code was a mess. So this time i will start with one function; FastSpawn.
This time the dll injects succesfull. And got the messagebox. But when i play the fastspawn function doens't work. I hope someone can tell me whats wrong!
Addy's are succesfully loaded and i got them from here, i suppose they are good.
znoen,
I have some background in obj-c and vb.NET. Now trying to learn C++ by making some warrock hacks. If they work i will post them on mpgh ofcourse!
The first code was a mess. So this time i will start with one function; FastSpawn.
This time the dll injects succesfull. And got the messagebox. But when i play the fastspawn function doens't work. I hope someone can tell me whats wrong!
Code:
#include "addys.h"
#include <windows.h>
#include <stdio.h>
int posiX = 1;
int posiY = 1;
int posiZ = 1;
DWORD *ingame= (DWORD*)Addr_Playerpointer;
DWORD *outgame= (DWORD*)Addr_Serverpointer;
void Spawn()
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_NOSPAWNWAIT1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPAWNWAIT1, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPAWNWAIT1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_NOSPAWNWAIT2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPAWNWAIT2, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPAWNWAIT2, sizeof(t), Protection, 0);
}
void HackThread()
{
for(;; )
{
if(*ingame)
{
Spawn(); //
}
if(*outgame)
{
}
}
Sleep(200);
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
MessageBoxA(NULL,"Znoen","version: 0.1b2",MB_OK);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0);
break;
}
return TRUE;
}
znoen,