Yeah, so I don't disconnect, but the hacks just dont work when the appropriate hotkey is pressed here is my script -
Code:
#include <windows.h>
//#include "d3d9font.cpp/.h
#include <string.h>
#include <stdio.h>
#include <Windows.h>
#include <iostream>
#include <vector>
#include <ShellAPI.h>
using namespace std;
bool chams = false;
#pragma comment(lib, "shell32.lib")
bool IsGameReadyForHook()
{
if(GetModuleHandleA("cshell.dll") && GetModuleHandleA("clientfx.fxd") && GetModuleHandleA("Ehsvc.dll") != NULL)
return true;
else return false;
}
DWORD WINAPI dwMain(LPVOID lpParam)
{
while(IsGameReadyForHook())
{
void main();
Sleep(100);
return 0;
}
}
BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
if( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, dwMain, NULL, NULL, NULL );
}
return TRUE;
}
void __cdecl CPush(const char *Command, char *Value)
{
char *PCommand = new char[256];
sprintf(PCommand, "%s %s", Command, Value);
DWORD LTC = 0x00485E10;
void *Control = (void*)LTC;
__asm
{
push PCommand;
call Control;
add esp, 4;
}
}
void main(){
while(true){
cout << "yes it has attatched nicely" << endl;
return (void)1;
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
chams = true;
} else {
chams = false;
}
if(chams) {
CPush("SkelModelStencil","1");
}else{
CPush("SkelModelStencil", "0");
}
}
}