❗ Who can helP???
I am working on a menu hack, witch works with no compile error,
I fixed disappearing menu, put now when i turn hacks on, nothing happens, it goes to on, but not even the chams work!!!
I an using the CaBase that Whit gave out...
here are my codes
I fixed disappearing menu, put now when i turn hacks on, nothing happens, it goes to on, but not even the chams work!!!
I an using the CaBase that Whit gave out...
here are my codes
Code:
#include "Base.h"
#include "Menu.h"
//Menu Position
int menux = 20;
int menuy = 200;
//Hack Variables
int test1 = 0;
int test2 = 0;
int test3 = 0;
int test4 = 0;
int test5 = 0;
int test6 = 0;
cBase Base;
//Menu Groups
int misc = 1;
int removals = 1;
int visual = 1;
int Others = 1;
void cMenu::RenderMenu(void)
{
AddItem(" [ Visuals ]", Opt_Folder, &visual, 2, MENUFOLDER);
if(visual){
AddItem("Nx-Chams" , Opt_on_off , &test1 , 2, MENUITEM);//
AddItem("Wireframe" , Opt_on_off , &test2 , 2 , MENUITEM);//
}
AddItem(" [ Removals ]", Opt_Folder, &removals, 2, MENUFOLDER);
if (removals) {
AddItem("NoFog" , Opt_on_off , &test3 , 2, MENUITEM);//
AddItem("NoSpread" , Opt_on_off , &test4 , 2, MENUITEM);//
}
AddItem(" [ VIP ]", Opt_Folder, &misc, 2, MENUFOLDER);
if(misc){
AddItem("OPK" , Opt_on_off , &test5 , 2, MENUITEM);//
AddItem("Telekill" , Opt_on_off , &test6 , 2, MENUITEM);//
}
}
void __cdecl cBase::PushToConsole(const char* szCommand )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( 0x377E7810 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}
void cBase::Update(void)
{
while(1)
{
if( test1 > 0 ) {
PushToConsole("SkelModelStencil 1");
} else {
PushToConsole("SkelModelStencil 0");
}
}
{
if( test2 >0 ) {
PushToConsole("WireframeModels 1" );
} else {
PushToConsole("WireframeModels 0" );
}
}
{
if (test3 >0 ) {
PushToConsole("FogEnable 1" );
} else {
PushToConsole("FogEnable 0" );
}
}
}
DWORD posptr;
DWORD posy;
#define posyoffset 0xCC
#define charposoffset 0x66F34
DWORD playertarget;
#define otherplyrptr 0x377CD639
#define yoffset 0xCC
void VIP(void)
{
posptr = (DWORD)GetModuleHandleA( "ClientFX.fxd" );
posptr += charposoffset;
memcpy(&posy,(void *)(posptr),4);
posy += posyoffset;
memcpy(&playertarget,(void *)(otherplyrptr),4);
playertarget += yoffset;
if(posy > posyoffset && playertarget > yoffset)
{
if( test5 > 0 ) //Tele-Kill
{
*(float*)posy = *(float*)playertarget+20.0f;
*(float*)(posy+0x4) = *(float*)(playertarget+0x4);
*(float*)(posy-0x4) = *(float*)(playertarget-0x4);
}
if( test6 > 0 ) //OPK
{
*(float*)playertarget = *(float*)posy;
*(float*)(playertarget+0x4) = *(float*)(posy+0x4);
*(float*)(playertarget-0x4) = *(float*)(posy-0x4);
}
}
}
void cBase::RenderFrame(LPDIRECT3DDEVICE9 pDevice)
{
if (Directx.pFont != 0)
Directx.pFont->Release();
Directx.pFont = 0;
if(Directx.pFont == NULL)
D3DXCreateFontA(pDevice, 15, 0, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Black", &Directx.pFont );
if (Mmax==0) Menu.RenderMenu();
if(Mvisible){
//Do You Gui/Drawbox Here
}
Menu.MenuShow(menux,menuy,Directx.pFont);
Menu.MenuNav();
}
DWORD cBase::GetPointer(int index)
{
DWORD* devicePtr = ***(DWORD****)0x909EF8;
if( devicePtr == NULL )
return 0;
return devicePtr[index];
}
bool cBase::IsGameReadyForHook(void)
{
if( GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "ClientFX.fxd" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL )
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while ( !Base.IsGameReadyForHook() )
Sleep(iWaitTime);
Directx.Hook();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
#ifdef LOG
DeleteFile(LogPath);
#endif
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
}
return TRUE;
}

