Thread: Help =/

Results 1 to 3 of 3
  1. #1
    Syntacma's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired

    Thumbs down Help =/

    i am Coding My new Hack , i still learning , i know the basics and stuff but i am stuck in this Base since Everytime I Turn on No fog It Turns On every hack under....

    here is the code
    Code:
    #include "stdafx.h"
    #include "Menu.h"
    #include "Hook.h"
    
    //////////////////////////////////
    #define DeviceGame      0x009106A0 //
    #define LTClientEXE     0x00485F90 //
    #define LTClientDLL     0x377B6460 // 
    #define GameStatus      0x377AF0D0 //
    #define NameTags1       0x372EA2BD //
    #define NameTags2       0x372EA23A //
    #define WeaponRange     0x3740EFB9 //
    //////////////////////////////////
    
    //Menu
    CHAR MenuTitle[25] = { "TITLE "}; // Titulo do hack aqui, Menu Title.
    CHAR Timestruct[25] = { "hh':'mm':'ss tt" }; // Estrutura Relogio.
    CHAR TimeString[25];
    INT MenuSelection;
    BOOL Menu = TRUE;
    BOOL bFont;
    
    //Hack Variables
    INT FPS;
    INT Cross;
    INT bFPS;
    INT nofog;
    INT FullBright;
    INT WireSFrame;
    
    
    INT quantdehacks = 5;
    
    VOID PTC(CONST CHAR *Command)
    {
    
    	
    __asm {
    
    PUSHAD;
    NOP;
    MOV EAX, LTClientEXE; 
    WAIT;
    MOV EBX, LTClientEXE;
    WAIT;
    NOP;
    CMP EAX, EBX;
    NOP;
    add eax, 4
    JZ Hello; 
    NOP;
    Hello:       
    NOP;
    PUSH Command;
    NOP;
    MOV EAX, LTClientEXE;
    NOP;
    CALL EAX;
    NOP;
    ADD ESP, 0x4;
    NOP;
    sub EDI, 0x5;
    sub esi, 0x1;
    POPAD;
    }
    }
    	
    
    
    HRESULT WINAPI hkReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS *a)
    {
    	Directx_Font->OnLostDevice();
    
    	HRESULT hTorna = oReset(pDevice, a);
    
    	if(SUCCEEDED(hTorna))
    		Directx_Font->OnResetDevice();
    
    	return hTorna;
    }
    
    HRESULT WINAPI hkPresent(LPDIRECT3DDEVICE9 pDevice, CONST RECT *a, CONST RECT *b, HWND c, CONST RGNDATA *d)
    {
    	if(Directx_Font) {
    		Directx_Font->Release();
    		Directx_Font = NULL;
    		bFont = FALSE;
    	}
    
    	if(!bFont) {
    		D3DXCreateFont(pDevice, 14, 0, FW_NORMAL, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx_Font);
    		bFont = TRUE;
    	}
    
    	if(GetAsyncKeyState(VK_INSERT)&1) Menu = !Menu;	
    
    	if(Menu && Directx_Font) {
    		pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    		GetTimeFormat(NULL, NULL, NULL, NULL, Timestruct, 15);
    
    		DrawBox(pDevice, 20, 25, 35, 162, Blue, Black);//Draw box do titulo.		
    		DrawText(pDevice, 30, 35, Yellow, MenuTitle);// Titulo do hack. MenuTitle declaração, então deve mudar la em cima.
    		sprintf_s(TimeString, "%s", Timestruct);// Relogio.
    		DrawText(pDevice, 130, 35, Yellow, TimeString);// Texto do Relogio.	
    		DrawBox(pDevice, 20, 70, 110, 162, Blue, Black);
    
    		DrawText(pDevice, 30, 80, White, "Show FPS");
    		if(FPS == 1) DrawText(pDevice, 150, 80, Green, "ON");
    		if(FPS == 0) DrawText(pDevice, 150, 80,   Red, "OFF");
    
    		DrawText(pDevice, 30, 100, White, "CrossHair");
    		if(Cross == 1) DrawText(pDevice, 150, 100, Green, "ON");
    		if(Cross == 0) DrawText(pDevice, 150, 100,   Red, "OFF");
    
    		DrawText(pDevice, 30, 120, White, "nofog");
    		if(nofog == 1) DrawText(pDevice, 150, 120, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 120,   Red, "OFF");
    
    		DrawText(pDevice, 30, 140, White, "FullBright ");
    		if(nofog == 1) DrawText(pDevice, 150, 140, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 140,   Red, "OFF");
    
    		DrawText(pDevice, 30, 160, White, "WireFrame");
    		if(nofog == 1) DrawText(pDevice, 150, 160, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 160,   Red, "OFF");
    
    
    		//DrawText(pDevice, 30, 60, White, "Nome da Função");
    		//if(VariaveldaFunção == 1) DrawText(pDevice, 150, INT Y (Valor de cima +20)120, Green, "[On]");
    		//if(VariaveldaFunção == 0) DrawText(pDevice, 150, INT Y (Valor de cima +20)120,   Red, "[Off]");
    		//Cada função que for adicionar Sempre aumente a INT Y de cada uma em 20 para ficar ajustado. Espero que intenda.
    		
    		if(GetAsyncKeyState(VK_UP)&1) {
    			MenuSelection--;
    			if(MenuSelection < 0) MenuSelection = quantdehacks - 1;
    		}
    
    		if(GetAsyncKeyState(VK_DOWN)&1) {
    			MenuSelection++;
    			if(MenuSelection > quantdehacks - 1) MenuSelection = 0;
    		}
    
    		if(GetAsyncKeyState(VK_RIGHT)&1) {
    			switch(MenuSelection) {
    				case 0:
    					FPS++; if(FPS > 1) FPS = 1; break;
    				case 1:
    					Cross++; if(Cross > 1) Cross = 1; break;
    				case 2:
    					nofog++; if(nofog > 1) nofog = 1; break;
    				case 3:
    					FullBright++; if(FullBright > 1) FullBright = 1; break;
    				case 4:
    					WireSFrame++; if(WireSFrame > 1) WireSFrame = 1; break;
    				//case 2:
    					//Variavel++; if(Variavel > 1) Variavel =1; break;// Sempre adicionar um novo a cada nova função adicionada.
    				default:
    					break;
    			}
    		}
    
    		if(GetAsyncKeyState(VK_LEFT)&1) {
    			switch(MenuSelection) {
    				case 0:
    					FPS--; if(FPS < 0) FPS = 0; break;
    				case 1:
    					Cross--; if(Cross <0) Cross = 0; break;
    				case 2:
    					nofog--; if(nofog <0) nofog = 0; break;
    				case 3:
    					FullBright--; if(FullBright <0) FullBright = 0; break;
    				case 4:
    					WireSFrame--; if(WireSFrame <0) WireSFrame = 0; break;
    				//case 2:
    					//Variavel--; if(Variavel > 0) Variavel =0; break;// Sempre adicionar um novo a cada nova função adicionada.
    				default:
    					break;
    			}
    		}
    
    		for(INT x = 0; x < quantdehacks + 1; x++) {
    			if(MenuSelection == x) 
    				CurrentOption(pDevice, 25, 80 + 20 * x, 15, 150, Cyan);// Opção de seleção/Current Option.
    		}
    	}
    
    	if(Cross) CrossHair(pDevice, Red);
    	if(FPS && !bFPS) {
    		PTC("ShowFPS 1");
    		bFPS = 1;
    	} else if(!FPS && bFPS) {
    		PTC("ShowFPS 0");
    		bFPS = 0;
    
    	}
    	if(FullBright && !bFPS) {
    		PTC("FullBright 1");
    		bFPS = 1;
    	} else if(!FullBright && bFPS) {
    		PTC("FullBright 0");
    		bFPS = 0;
    
    	}
    
    	if(nofog && !bFPS) {
    		PTC("FogEnable 0");
    		bFPS = 1;
    	} else if(!nofog && bFPS) {
    		PTC("FogEnable 1");
    		bFPS = 0;
    	}
    	if(WireSFrame && !bFPS) {
    		PTC("WireframeModels 1");
    		bFPS = 1;
    	} else if(!WireSFrame && bFPS) {
    		PTC("WireframeModels 0");
    		bFPS = 0;
    	}
    
    	return oPresent(pDevice, a, b, c, d);
    }
    
    DWORD WINAPI Hook(LPVOID lpArgs)
    {
    	DWORD dwD3D9 = 0;
    
    	while(!dwD3D9) {
    		Sleep(100);
    		dwD3D9 = (DWORD)GetModuleHandle("d3d9.dll");
    	}
    
    	DWORD dwVTable[1] = {0};
    	CreateDevice(dwVTable);
    
    	oReset   = (tReset)  DetourCreate((PBYTE) dwVTable[0], (PBYTE) &hkReset, 5);
    	oPresent = (tPresent)DetourCreate((PBYTE) dwVTable[1], (PBYTE) &hkPresent, 5);
    	
    	return FALSE;
    }

    hope you guys can tell me what i am doing wrong since it doesnt happen With ShowFps and CrossHair

  2. #2
    mountainjew's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    51
    Reputation
    10
    Thanks
    18
    My Mood
    Amused
    Code:
    	DrawText(pDevice, 30, 120, White, "nofog");
    		if(nofog == 1) DrawText(pDevice, 150, 120, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 120,   Red, "OFF");
    
    		DrawText(pDevice, 30, 140, White, "FullBright ");
    		if(nofog == 1) DrawText(pDevice, 150, 140, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 140,   Red, "OFF");
    
    		DrawText(pDevice, 30, 160, White, "WireFrame");
    		if(nofog == 1) DrawText(pDevice, 150, 160, Green, "ON");
    		if(nofog == 0) DrawText(pDevice, 150, 160,   Red, "OFF");
    Hint: look at the variable being used to handle nofog.

  3. #3
    Syntacma's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    65
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    Yeah i realized , thanks @mountainjew

Similar Threads

  1. [Help Request] Combat arms Vid help
    By djw111 in forum Combat Arms Help
    Replies: 4
    Last Post: 12-24-2011, 06:06 PM
  2. [Help Request] AFK Bot [help]
    By fet in forum Combat Arms Help
    Replies: 7
    Last Post: 04-28-2011, 04:17 AM
  3. [Help Request] Injector Admin help
    By asdfgas in forum Combat Arms Help
    Replies: 4
    Last Post: 04-27-2011, 07:12 PM
  4. [Help Request] Ajuda / Help
    By - Battery' in forum Combat Arms BR Coding Help
    Replies: 3
    Last Post: 04-22-2011, 08:15 PM
  5. [Help Request] Help my!
    By Windowns7 in forum Combat Arms BR Coding Help
    Replies: 2
    Last Post: 04-18-2011, 02:41 PM