sir lauwy can you check?? because i have edit your source codes and make like this
Code:
// OvHacks**** - CrossFire PH Rev2.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
bool IsGameReadyForHook()
{
if(GetModuleHandleA("CShell.dll") != NULL)
{
return true;
else {
return false;
}
}
}
int __cdecl PushToConsole( const char* szCommand ) {
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL ) {
DWORD *LTClient = ( DWORD* )( (dwCShell + 0xE8) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F7 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}
void main ()
{
bool boxes = true;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool nosmoke = false;
bool WhitePlayers = false;
while(1)
{
if(GetAsyncKeyState(VK_F7)&1){
WhitePlayers = !WhitePlayers;
}
if(GetAsyncKeyState(VK_F6)&1){
nosmoke = !nosmoke;
}
if(GetAsyncKeyState(VK_F2)<0){
boxes = !boxes;
}
if(GetAsyncKeyState(VK_F3)<0){
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_F4)<0){
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_F5)<0){
nogun = !nogun;
}
if (nogun){
PushToConsole ("DrawGuns 0");
else{
PushToConsole ("DrawGuns 1");
}}
if (boxes){
PushToConsole("ModelDebug_DrawBoxes 1");
else{
PushToConsole("ModelDebug_DrawBoxes 0");
}}
if (worldframe){
PushToConsole("WireFrame 1");
else{
PushToConsole("WireFrame 0");
}}
if (playerframe){
PushToConsole("WireFrameModels 1");
else{
PushToConsole("WireFrameModels 0");
}}
if (nosmoke){
PushToConsole("DrawParticles 0");
else{
PushToConsole("DrawParticles 1");
}}
if (WhitePlayers){
PushToConsole("TextureModels 0");
else{
PushToConsole("TextureModels 1");
}}
Sleep(100);
}
}
DWORD WINAPI yhd(LPVOID) {
while(IsGameReadyForHook() )
Sleep(25);
main ();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Credits : Sir Lauwy and Ovenran", "Injection Success", 0);
CreateThread(NULL, NULL, yhd, NULL, NULL, NULL);
Sleep(100);
}
return TRUE;
}
or this one?
Code:
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
bool IsGameReadyForHook()
{
if(GetModuleHandleA("CShell.dll") != NULL)
{
return true;
else
return false;
}
}
int __cdecl PushToConsole( const char* szCommand ) {
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL ) {
DWORD *LTClient = ( DWORD* )( (dwCShell + 0xE8) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F7 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}
void main ()
{
bool boxes = true;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool nosmoke = false;
bool WhitePlayers = false;
while(1)
{
if(GetAsyncKeyState(VK_F7)&1){
WhitePlayers = !WhitePlayers;
}
if(GetAsyncKeyState(VK_F6)&1){
nosmoke = !nosmoke;
}
if(GetAsyncKeyState(VK_F2)<0){
boxes = !boxes;
}
if(GetAsyncKeyState(VK_F3)<0){
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_F4)<0){
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_F5)<0){
nogun = !nogun;
}
if (nogun){
PushToConsole ("DrawGuns 0");
else
PushToConsole ("DrawGuns 1");
}
if (boxes){
PushToConsole("ModelDebug_DrawBoxes 1");
else
PushToConsole("ModelDebug_DrawBoxes 0");
}
if (worldframe){
PushToConsole("WireFrame 1");
else
PushToConsole("WireFrame 0");
}
if (playerframe){
PushToConsole("WireFrameModels 1");
else
PushToConsole("WireFrameModels 0");
}
if (nosmoke){
PushToConsole("DrawParticles 0");
else
PushToConsole("DrawParticles 1");
}
if (WhitePlayers){
PushToConsole("TextureModels 0");
else
PushToConsole("TextureModels 1");
}
Sleep(100);
}
}
DWORD WINAPI yhd(LPVOID) {
while(IsGameReadyForHook() )
Sleep(25);
main ();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Credits : Sir Lauwy and Ovenran", "Injection Success", 0);
CreateThread(NULL, NULL, yhd, NULL, NULL, NULL);
Sleep(100);
}
return TRUE;
}
or this one?
Code:
// OvHacks**** - CrossFire PH Rev2.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
bool IsGameReadyForHook()
{
if(GetModuleHandleA("CShell.dll") != NULL)
{
return true;
else
return false;
}
}
int __cdecl PushToConsole( const char* szCommand ) {
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL ) {
DWORD *LTClient = ( DWORD* )( (dwCShell + 0x1F8) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F7 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}
void main ()
{
bool boxes = true;
bool worldframe = false;
bool playerframe = false;
bool nogun = false;
bool nosmoke = false;
bool WhitePlayers = false;
while(1)
{
if(GetAsyncKeyState(VK_F7)&1){
WhitePlayers = !WhitePlayers;
}
if(GetAsyncKeyState(VK_F6)&1){
nosmoke = !nosmoke;
}
if(GetAsyncKeyState(VK_F2)<0){
boxes = !boxes;
}
if(GetAsyncKeyState(VK_F3)<0){
worldframe = !worldframe;
}
if(GetAsyncKeyState(VK_F4)<0){
playerframe = !playerframe;
}
if(GetAsyncKeyState(VK_F5)<0){
nogun = !nogun;
}
if (nogun){
PushToConsole ("DrawGuns 0");
else
PushToConsole ("DrawGuns 1");
}
if (boxes){
PushToConsole("ModelDebug_DrawBoxes 1");
else
PushToConsole("ModelDebug_DrawBoxes 0");
}
if (worldframe){
PushToConsole("WireFrame 1");
else
PushToConsole("WireFrame 0");
}
if (playerframe){
PushToConsole("WireFrameModels 1");
else
PushToConsole("WireFrameModels 0");
}
if (nosmoke){
PushToConsole("DrawParticles 0");
else
PushToConsole("DrawParticles 1");
}
if (WhitePlayers){
PushToConsole("TextureModels 0");
else
PushToConsole("TextureModels 1");
}
Sleep(100);
}
}
DWORD WINAPI yhd(LPVOID) {
while(IsGameReadyForHook() )
Sleep(25);
main ();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA(0, "Credits : Sir Lauwy and Ovenran", "Injection Success", 0);
CreateThread(NULL, NULL, yhd, NULL, NULL, NULL);
Sleep(100);
}
return TRUE;
}