Post your source dude you've done something retarded
Hello people,
I have finished my hack's source code, copied and pasted it in Visual C++ Studio (Base.cpp) but when building finishes it gives me some errors and i really can't figure out why.
These are the occuring errors:
I think i can correct the 4,7 errors but what about the others?Code:1) error C2181: illegal else without matching if 2) error C2181: illegal else without matching if 3) error C2601: 'dwHackThread' : local function definitions are illegal 4) this line contains a '{' which has not yet been matched 5) error C2601: 'DllMain' : local function definitions are illegal 6) this line contains a '{' which has not yet been matched 7)fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\user\my documents\visual studio 2008\projects\hack\hack\base.cpp(64)' was matched
Any help is appreciated.
Post your source dude you've done something retarded
1. Grant power to the people and the people will grant power to you.
2. Make the strong your allys and the weak your friends.
These are the laws of freedom
Yeah post your source, or the error lines.
BUt it seems like you are missing some of those { }
KnifeHacker (07-31-2010)
Did you C&P something?
-Rest in peace leechers-
Your PM box is 100% full.
Ok here it is:
[php]#include <windows.h>
#define LTClient 0x37767BD0
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* )( LTClient );
void* CONoff = ( void* )*( DWORD* )( *Ltclient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, -3-1+2+6;
}
}
void main()
{
while(true)
Sleep(100);
{
if(GetAsyncKeyState(VK_INSERT)&1){
{
//No spread
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
PushToConsole("PerturbRecoil 0.000000");
PushToConsole("FireMovePerturb 0.000000");
PushToConsole("ZoomedFireMoveDuckPerturb 0.000000");
PushToConsole("ZoomedFireMovePerturb 0.000000");
PushToConsole("ZoomedFireDuckPerturb 0.000000");
//No recoil
memcpy((LPVOID)0x3741A700, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A714, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A717, "\x90\x90\x90", 3);
memcpy((LPVOID)0x37418209, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A720, "\x90\x90\x90", 3);
//Removals
PushToConsole("DynamicLight 0");
PushToConsole("EnableWeatherFX 0");
PushToConsole("MuzzleLight 0");
PushToConsole("SnowEnable 0");
PushToConsole("CamDamage 0");
PushToConsole("ModelApplySun 0");
PushToConsole("ClientFXDetailLevel 0");
PushToConsole("ModelShadow_Proj_Enable 0");
PushToConsole("DebrisFXLevel 0");
PushToConsole("ScatterEnable 0");
PushToConsole("modelshadow_proj_blurenable 0");
PushToConsole("DrawAllModelShadows 0");
PushToConsole("ModelShadow_Proj_MinColorComponent 0");
PushToConsole("ModelShadow_Proj_MaxProjDist 0");
//No fog
PushToConsole("FogEnable 0");
//NX chams
PushToConsole("SkelModelStencil -1" );
}
else{
//No spread
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbWalkPercent 9.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.500000");
PushToConsole("PerturbRecoil 9.000000");
PushToConsole("FireMovePerturb 9.000000");
PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
PushToConsole("ZoomedFireMovePerturb 9.000000");
PushToConsole("ZoomedFireDuckPerturb 9.000000");
//No recoil
memcpy((LPVOID)0x3741A700, "\xD8\x66\x54", 3);
memcpy((LPVOID)0x3741A714, "\xD9\x46\x54", 3);
memcpy((LPVOID)0x3741A717, "\xD9\x5E\x54", 3);
memcpy((LPVOID)0x37418209, "\xD9\x46\x48", 3);
memcpy((LPVOID)0x3741A720, "\xD9\x5E\x48", 3);
//Removals
PushToConsole("DynamicLight 1");
PushToConsole("EnableWeatherFX 1");
PushToConsole("MuzzleLight 1");
PushToConsole("SnowEnable 1");
PushToConsole("CamDamage 1");
PushToConsole("ModelApplySun 1");
PushToConsole("ClientFXDetailLevel 1");
PushToConsole("ModelShadow_Proj_Enable 1");
PushToConsole("DebrisFXLevel 1");
PushToConsole("ScatterEnable 1");
PushToConsole("modelshadow_proj_blurenable 1");
PushToConsole("DrawAllModelShadows 1");
PushToConsole("ModelShadow_Proj_MinColorComponent 1");
PushToConsole("ModelShadow_Proj_MaxProjDist 1");
//No fog
PushToConsole("FogEnable 1");
//NX chams
PushToConsole("SkelModelStencil 0" );
{ //Full bright
if(GetAsyncKeyState(VK_NUMPAD2)<0){
{
PushToConsole("FullBright 1");
}
else{
PushToConsole("FullBright 0");
}
}
}
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
} [/php]
Well most of the code is from CN's tutorial.
That's 1 if corrected ... you can't code can you ?Code:if(GetAsyncKeyState(VK_NUMPAD2)<0){ PushToConsole("FullBright 1"); }
and theres the other I'll give a compleatly corrected ver in a secCode:if(GetAsyncKeyState(VK_INSERT)&1) {
Last edited by kelechi96; 07-31-2010 at 05:31 AM.
1. Grant power to the people and the people will grant power to you.
2. Make the strong your allys and the weak your friends.
These are the laws of freedom
Right Click Go To Location o-o
Fixed. I also added indents it helps me know the flow of the functionsCode:#include <windows.h> #define LTClient 0x37767BD0 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* )( LTClient ); void* CONoff = ( void* )*( DWORD* )( *Ltclient + 0x208 ); __asm { push szCommand; call CONoff; add esp, (-3-1)+(2+6); } } void main() { while(true) { Sleep(100); if(GetAsyncKeyState(VK_INSERT)&1) { //No spread PushToConsole("PerturbRotationEffect 0.000000"); PushToConsole("PerturbIncreaseSpeed 0.000000"); PushToConsole("PerturbWalkPercent 0.000000"); PushToConsole("PerturbFiringIncreaseSpeed 0.000000"); PushToConsole("PerturbRecoil 0.000000"); PushToConsole("FireMovePerturb 0.000000"); PushToConsole("ZoomedFireMoveDuckPerturb 0.000000"); PushToConsole("ZoomedFireMovePerturb 0.000000"); PushToConsole("ZoomedFireDuckPerturb 0.000000"); //No recoil memcpy((LPVOID)0x3741A700, "\x90\x90\x90", 3); memcpy((LPVOID)0x3741A714, "\x90\x90\x90", 3); memcpy((LPVOID)0x3741A717, "\x90\x90\x90", 3); memcpy((LPVOID)0x37418209, "\x90\x90\x90", 3); memcpy((LPVOID)0x3741A720, "\x90\x90\x90", 3); //Removals PushToConsole("DynamicLight 0"); PushToConsole("EnableWeatherFX 0"); PushToConsole("MuzzleLight 0"); PushToConsole("SnowEnable 0"); PushToConsole("CamDamage 0"); PushToConsole("ModelApplySun 0"); PushToConsole("ClientFXDetailLevel 0"); PushToConsole("ModelShadow_Proj_Enable 0"); PushToConsole("DebrisFXLevel 0"); PushToConsole("ScatterEnable 0"); PushToConsole("modelshadow_proj_blurenable 0"); PushToConsole("DrawAllModelShadows 0"); PushToConsole("ModelShadow_Proj_MinColorComponent 0"); PushToConsole("ModelShadow_Proj_MaxProjDist 0"); //No fog PushToConsole("FogEnable 0"); //NX chams PushToConsole("SkelModelStencil -1" ); } else { //No spread PushToConsole("PerturbRotationEffect 3.000000"); PushToConsole("PerturbIncreaseSpeed 3.000000"); PushToConsole("PerturbWalkPercent 9.000000"); PushToConsole("PerturbFiringIncreaseSpeed 0.500000"); PushToConsole("PerturbRecoil 9.000000"); PushToConsole("FireMovePerturb 9.000000"); PushToConsole("ZoomedFireMoveDuckPerturb 9.000000"); PushToConsole("ZoomedFireMovePerturb 9.000000"); PushToConsole("ZoomedFireDuckPerturb 9.000000"); //No recoil memcpy((LPVOID)0x3741A700, "\xD8\x66\x54", 3); memcpy((LPVOID)0x3741A714, "\xD9\x46\x54", 3); memcpy((LPVOID)0x3741A717, "\xD9\x5E\x54", 3); memcpy((LPVOID)0x37418209, "\xD9\x46\x48", 3); memcpy((LPVOID)0x3741A720, "\xD9\x5E\x48", 3); //Removals PushToConsole("DynamicLight 1"); PushToConsole("EnableWeatherFX 1"); PushToConsole("MuzzleLight 1"); PushToConsole("SnowEnable 1"); PushToConsole("CamDamage 1"); PushToConsole("ModelApplySun 1"); PushToConsole("ClientFXDetailLevel 1"); PushToConsole("ModelShadow_Proj_Enable 1"); PushToConsole("DebrisFXLevel 1"); PushToConsole("ScatterEnable 1"); PushToConsole("modelshadow_proj_blurenable 1"); PushToConsole("DrawAllModelShadows 1"); PushToConsole("ModelShadow_Proj_MinColorComponent 1"); PushToConsole("ModelShadow_Proj_MaxProjDist 1"); //No fog PushToConsole("FogEnable 1"); //NX chams PushToConsole("SkelModelStencil 0" ); //Full bright } } if(GetAsyncKeyState(VK_NUMPAD2)<0) { PushToConsole("FullBright 1"); } else { PushToConsole("FullBright 0"); } } DWORD WINAPI dwHackThread(LPVOID) { while( !IsGameReadyForHook() ) Sleep(100); main(); return 0; } BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) { DisableThreadLibraryCalls(hDll); if ( dwReason == DLL_PROCESS_ATTACH ) { CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL); } return TRUE; }
1. Grant power to the people and the people will grant power to you.
2. Make the strong your allys and the weak your friends.
These are the laws of freedom
KnifeHacker (08-01-2010)
yeah all what was wrong was the possition of:
the while and pos of the sleep underneath the while so instead of a shortage of {} it says u used to much :| i guess.
what the hell are u talking about you can use both =_= all keys are 0 while there pressed if they get 1 its bigger then 0 so it activates >.> have both of these in my code like to switch :3
Last edited by Kuro Tenshi; 07-31-2010 at 06:12 AM.
@ Anime Section,Otaku/weeabo (orz.) @Graphics Section, Novice DigiArtist
neuest gift from Yura~Chan:
https://bakyurayuu.deviantar*****m/#/d372taw
2nd Place MOTM#9 Theme: CharMods - Combat Arms [No - Thanks] button
come on you know that don't want to push that ordinary button
I think I'm owed a thank and a rep from this sorry noob
1. Grant power to the people and the people will grant power to you.
2. Make the strong your allys and the weak your friends.
These are the laws of freedom
im sure thts gna be a laggy hack :/
cough dont go flame btw i have seen you earlier but yeah ... not really a person i know on this section tough. even if you not a newphag
quite true seems like it has no bools so the use should hold the key to get it working since when on release it switches back to normal values
Last edited by Kuro Tenshi; 07-31-2010 at 06:17 AM.
@ Anime Section,Otaku/weeabo (orz.) @Graphics Section, Novice DigiArtist
neuest gift from Yura~Chan:
https://bakyurayuu.deviantar*****m/#/d372taw
2nd Place MOTM#9 Theme: CharMods - Combat Arms [No - Thanks] button
come on you know that don't want to push that ordinary button
Hello,
Thanks for the corrected code , i just came home.
Thanked+rep , also thanks to all for your quick replies.
Last edited by KnifeHacker; 08-01-2010 at 06:25 AM.