Hello guyz. I followed CN's tut to create my first hack, but I always get disconnected I would like to know what's wrong with my 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()
{
    while(true)
    {
        PushToConsole("ShowFps 1");//Show Fps
        PushToConsole("SkelModelStencil -1" );//Nx Chams
        PushToConsole("ActivationDistance 999999" );//Activation Distance
        //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" );
        //End No Spread
    }
}

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;
}