[HELP] Will This Work?

Posts 1–10 of 10 · Page 1 of 1
[HELP] Will This Work?
Code:
// CA HACK.cpp : Defines the exported functions for the DLL application.
//

#include "stdafx.h"
#include <windows.h>
#include <shellapi.h>
#pragma comment(lib,"shell32.lib")

void __cdecl PushToConsole( const char* szCommand )
{
	DWORD L***ient = ( DWORD* )( 0x3776FCC8 );
	void* CONoff = ( void* )*( DWORD* )( L***ient + 0x208 );
 
	__asm
	{
		push szCommand;
		call CONoff;
		add esp, 4;
	}
}
bool IsGameReadyForHook()
{
    if( GetModuleHandleA( "d3d9.dll"     ) != NULL 
     && GetModuleHandleA( "ClientFX.fxd" ) != NULL 
     && GetModuleHandleA( "CShell.dll"   ) != NULL )
        return true;

    return false;
}
		void MemCopy(void* Dest, const void* Src, int Len)
{
    DWORD OldProtect;
    DWORD OldProtect2;
    VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
    memcpy(Dest, Src, Len);
    VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
    FlushInstructionCache(GetCurrentProcess(), Dest, Len);
}
void main()
{


if(GetAsyncKeyState(VK_NUMPAD0 )<0){         
            if(spread){ 
                PushToConsole("PerturbRotationEffect 3.000000"); 
                PushToConsole("PerturbIncreaseSpeed 3.000000"); 
                PushToConsole("PerturbDecreaseSpeed 9.000000"); 
                PushToConsole("PerturbWalkPercent 0.500000"); 
                spread = false; 
            } else { 
                PushToConsole("PerturbRotationEffect  0.000000");  
                PushToConsole("PerturbIncreaseSpeed 0.000000");  
                PushToConsole("PerturbWalkPercent 0.000000");  
                PushToConsole("PerturbFiringIncreaseSpeed 0.000000"); 
                spread = true; 
            } 
        }  
// No Spread Hotkey: NUMPAD 0

if(GetAsyncKeyState(VK_NUMPAD1)<0){ 
            if(boxes){ 
                PushToConsole("ModelDebug_DrawBoxes 0"); 
                PushToConsole("SkelModelStencil 0"); 
                boxes = false; 
            } else { 
                PushToConsole("ModelDebug_DrawBoxes 1"); 
                PushToConsole("SkelModelStencil 1"); 
                boxes = true; 
            } 
        }  
// Boxes/Chams Hotkey: NUMPAD 1


if(GetAsyncKeyState(VK_NUMPAD2)<0){
			if(fog){
				PushToConsole("FogEnable 1");
				fog = false;
			} else {
				PushToConsole("FogEnable 0");
				fog = true;
			}
		}

//NO FOG Hotkey: NUMPAD 2

if( GetAsyncKeyState( VK_SHIFT ) < 0 ) 
{ 
            this->PushToConsole("BaseMoveAccel 4000.000000"); 
            this->PushToConsole("StartAccel 4000.000000"); 
            this->PushToConsole("MaxAccel 4000.000000"); 
            this->PushToConsole("AccelInc 4000.000000"); 
            this->PushToConsole("WalkVel 4000.000000"); 
            this->PushToConsole("FRunVel 4000.000000"); 
            this->PushToConsole("BRunVel 4000.000000"); 
            this->PushToConsole("SRunVel 4000.000000"); 
             
             
             
                                 
}else{ 

            this->PushToConsole("BaseMoveAccel 3000.000000"); 
            this->PushToConsole("StartAccel 500.000000"); 
            this->PushToConsole("MaxAccel 3000.000000"); 
            this->PushToConsole("AccelInc 6000.000000"); 
            this->PushToConsole("WalkVel 70.000000"); 
            this->PushToConsole("FRunVel 285.000000"); 
            this->PushToConsole("BRunVel 285.000000"); 
            this->PushToConsole("SRunVel 285.000000"); 
                     
}

//Speed Hack Hotkey:SHIFT
i dont know if it will not
what do i need to do so?
thanks in ADV.
I do not see any errors. And i am to Lazy to test right now Just being honest. But If you are going to make a hack Heads up... No spread is pretty much useless with out no recoil.. Just try and find the no recoil addresses.
no spread is not useless..even without no recoil..
actually there are some problems with it

you need to define boxes and the other features that you added and you can do that by doing this
bool boxes = false;
and same goes for the rest of the features that you will add
if i'm worng anyone please do correct me.
There is also no hook.
You need to hook the DLL to the process by doing this:

[php]
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&main, NULL, 0,NULL);//main being your hack thread
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
[/php]

And as the other guy said.
You need to define the hack names for them to work.
Like this:

[php]
//visuals
bool boxes = false;
bool fullbright = false;
bool fog = false;
//Removals
bool spread = false;
bool reach = false;
bool sway = false;
//Other
bool speed = false;
bool superjump = false;
bool vJump = false;
[/php]

And just ran a quick eye over it and saw you had no sleep timer. That will cause tremendous lag.
You also havent stated whats going to happen when you hook d3d8 ect.
So you will need to put this in your main.

[php]
void main()
{
while (!IsGameReadyForHook()){
Sleep(30);
}

while(true){

//Start commands here
}
}
[/php]

Thhats all i can really see atm.
combat arms is based off d3d9. anything coded in d3d8 wont work
its fine know i have changed from hotkeys to a menu


/CLOSE

plox
You still need all that stuff for a menu anyway
useing "BIG G" s base lol
/Close request by OP.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us