okay, well i managed to fix some of the errors but there are still 3.
Here's is my code (I swear if anyone leeches!)
[php]#include <windows.h>
#include "StdAfx.h"
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *L***ient = ( DWORD* )( 0x3777DDAC );
void* CONoff = ( void* )*( DWORD* )( *L***ient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool IsGameReadyForHook()
{
if GetModuleHandle( "d3d9.dll" ) != NULL
&& (GetModuleHandle( "ClientFX.fxd" ) != NULL)
&& (GetModuleHandle( "CShell.dll" ) != NULL )
return true;
return false;
}
void main()
{
while (!IsGameReadyForHook()){
Sleep(20);
}
bool boxes = false;
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);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
{
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;
}
}
[/php]
my probrlem is in the code
#include "stdafx.h" isnt in it but i cant run it w/o it...
here are the errors that i cant seem to solve:
Error 1 error C2061: syntax error : identifier 'GetModuleHandleW' c:\users\brian\documents\visual studio 2010\projects\boxeshax\boxeshax\boxeshax.cpp 21 1 BoxesHa
Error 2 error C2601: 'DllMain' : local function definitions are illegal c:\users\brian\documents\visual studio 2010\projects\boxeshax\boxeshax\boxeshax.cpp 39 1 BoxesHa
Error 3 error C1075: end of file found before the left brace '{' at 'c:\users\brian\documents\visual studio 2010\projects\boxeshax\boxeshax\boxeshax.cpp(52)' was matched c:\users\brian\documents\visual studio 2010\projects\boxeshax\boxeshax\boxeshax.cpp 65 1 BoxesHa
and if i delete the
#include "stdafx.h" here is the error i get:
Error 1 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source? c:\users\brian\documents\visual studio 2010\projects\boxeshax\boxeshax\boxeshax.cpp 64 1 BoxesHax
Please help