ok well i got my first code to work but then this happened:
c:\users\jman\documents\visual studio 2008\projects\jman's hotkey hack v0.1\jman's hotkey hack v0.1\whatev.cpp(22): this line contains a '{' which has not yet been matched
c:\users\jman\documents\visual studio 2008\projects\jman's hotkey hack v0.1\jman's hotkey hack v0.1\whatev.cpp(140) : fatal error C1075: end of file found before the left brace '{' at 'c:\users\jman\documents\visual studio 2008\projects\jman's hotkey hack v0.1\jman's hotkey hack v0.1\whatev.cpp(22)' was matched
Build log was saved at "file://c:\Users\Jman\Documents\Visual Studio 2008\Projects\Jman's Hotkey Hack v0.1\Jman's Hotkey Hack v0.1\Debug\BuildLog.htm"
Jman's Hotkey Hack v0.1 - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
i followed what the errors said but everytime i fix it i get more errors
heres the code:
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x377ED910 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
void main()
{
bool chams = false;
bool fog = false;
bool speed = false;
bool spread = false;
bool tracers = false;
bool showfps = false;
bool sjump = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1)<0){
if(chams == true){
PushToConsole("SkelModelStencil 0"); //Nx Chams
chams = false;
} else {
PushToConsole("SkelModelStencil 1");
chams = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD2)<0){
if(fog){
PushToConsole("FogEnable 1"); //No fog
fog = false;
} else {
PushToConsole("FogEnable 0");
fog = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD3)<0){ //No Spread
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;
}
}
if(GetAsyncKeyState(VK_NUMPAD4)<0){ //Speed
if(speed){
PushToConsole("BaseMoveAccel 3000.000000");
PushToConsole("StartAccel 500.000000");
PushToConsole("MaxAccel 3000.000000");
PushToConsole("AccelInc 6000.000000");
PushToConsole("WalkVel 70.000000");
PushToConsole("FRunVel 285.000000");
PushToConsole("BRunVel 285.000000");
PushToConsole("SRunVel 285.000000");
PushToConsole("DuckVel 50.000000");
speed = false;
} else {
PushToConsole("BaseMoveAccel 3000.000000");
PushToConsole("StartAccel 3000.000000");
PushToConsole("MaxAccel 3000.000000");
PushToConsole("AccelInc 3000.000000");
PushToConsole("WalkVel 3000.000000");
PushToConsole("FRunVel 3000.000000");
PushToConsole("BRunVel 3000.000000");
PushToConsole("SRunVel 3000.000000");
PushToConsole("DuckVel 3000.000000");
speed = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD5)<0){ //tracers
if(tracers){
PushToConsole("ShowFirePath 0");
tracers = false;
} else {
PushToConsole("ShowFirePath 1");
tracers = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD7)<0){ //show fps
if(showfps){
PushToConsole("ShowFps 0");
showfps = false;
} else {
PushToConsole("ShowFps 1");
showfps = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD6)<0){ //super jump
if(sjump){
PushToConsole("JumpVel 330.000000");
sjump = false;
} else {
PushToConsole("JumpVel 660.000000");
sjump = true;
}
// note to self remember sleep
Sleep(200);
}
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main(); // Load the void main.
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
//open to mpgh
system("start https://mpgh.net/");
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL); // Ignore this.
}
return TRUE;
}