Don't work i've tried many ways and it either doesn't do anything or makes me crash right when the little white guy loads.
Globals
Code:
#include "Base.h"
#include "Menu.h"
#include <time.h>
#define Y_Offset 0xCC
#define X_Offset 0xC8
#define Z_Offset 0xD0
#define charposoffset 0x66F34//player pointer
#define otherplyrptr 0x37835328//random player pointer
//0x37835328 original random player pointer
#define posyoffset 0xCC
#define yoffset 0xCC
#define posxoffset 0xC8
#define xoffset 0xC8
#define poszoffset 0xD0
#define zoffset 0xD0
DWORD posptr;//Telekill and OPK
DWORD posy;
DWORD playertarget;
DWORD posptr2;//Teleport
DWORD posy2;
DWORD playertarget2;
DWORD posptr3;//X offset for telekill and OPk
DWORD posx;
DWORD playertarget3;
DWORD posptr4;//Z offset for telekill and OPk
DWORD posz;
DWORD playertarget4;
int fopk;
float x;
float y;
float z;
int CA_opk = 0;
int CA_telekill = 0;
typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
RunConsoleCommand_t pRunConsoleCommand = (RunConsoleCommand_t)0x00485E10;
LPDIRECT3DDEVICE9 g_pDevice = 0;
cBase Base;
void __cdecl cBase::PushToConsole(char* szVal)
{
void* vSetVar = (void*)0x4A4750;
_asm
{
push szVal
call vSetVar
add esp, 4
}
}
Hack Part
Code:
void cBase::Update(void)
{
while(1)
{
if( Menu.mOpt[1].nopt > 0 )
{
pRunConsoleCommand("ShowFPS 1");
}else{
pRunConsoleCommand("ShowFPS 0");
}
}
OTHER HACK STUFF/////////////////////////////////////////////
/
/
/
/////////////////////////////////////
if( Menu.mOpt[16].nopt > 0 )
{
exit(1);
Sleep(400);
}
Sleep(400);
}
Sleep(400);
}
DWORD cBase::GetPointer(int index)
{
DWORD* devicePtr = ***(DWORD****)0x00909F20;
if( devicePtr == NULL )
return 0;
return devicePtr[index];
}
bool cBase::IsGameReadyForHook(void)
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while ( !Base.IsGameReadyForHook() )
Sleep(400);
Directx.Hook();
return 0;
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !Base.IsGameReadyForHook() )
Sleep(iWaitTime);
Base.Update();
return 0;
}
DWORD WINAPI dwOpkThread(LPVOID)
{
while( !Base.IsGameReadyForHook() )
Sleep(iWaitTime);
Base.Opk();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Hack Has Successfully Injected","Hack Has Been Created By ~~~~|{[Scorpoistak]}|~~~~", 0);
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
CreateThread(NULL, NULL, dwOpkThread, NULL, NULL, NULL);
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
and i've tried it without this------
Code:
void __cdecl cBase::PushToConsole(char* szVal)
{
void* vSetVar = (void*)0x4A4750;
_asm
{
push szVal
call vSetVar
add esp, 4
}
}