Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › CrossFire Hacks & Cheats › CrossFire Hack Coding / Programming / Source Code › [Question] Is this a correct code for CFPH?

Question[Question] Is this a correct code for CFPH?

Posts 1–9 of 9 · Page 1 of 1
ovenran
ovenran
[Question] Is this a correct code for CFPH?
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;
}
#1 · edited 16y ago · 16y ago
TheGamer321
TheGamer321
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
#2 · 16y ago
ovenran
ovenran
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;
}
sorry im middle coding in CF PH
#3 · 16y ago
TheGamer321
TheGamer321
error always
#4 · 16y ago
ovenran
ovenran
what should i do in "else" things
#5 · 16y ago
TheGamer321
TheGamer321
we need lauwy to find out wat is missing...
#6 · 16y ago
MiNT
MiNT
1- its missing the LT client
2- your if-else statements are completely wrong,for the purpose ur trying to use them
*whats wrong* having the else inside the { } when its supposed to be out

*suggestion* make it clearer for the reader of the code (YOU) and for the computer by maybe doing this

like:

if (boxes) PushToConsole("ModelDebug_DrawBoxes 1");
else if (!boxes) PushToConsole("ModelDebug_DrawBoxes 0");


press thanks and give credits, cuz i kno this helped u ":P
#7 · 16y ago
ovenran
ovenran
thanks! i will just put only if thanks
#8 · 16y ago
MiNT
MiNT
ummm... ok but the else is needed if u want to have the option of turning it on and off
#9 · 16y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • is this the right code for (Anti-Kick) New AddressesBy floris12345! in Visual Basic Programming
    6Last post 18y ago
  • Some One Try This Please Source Code For 1 Hit HackBy talamanak in CrossFire Hack Coding / Programming / Source Code
    28Last post 15y ago
  • Is this the right code for no reload?By Jordyr in CrossFire Help
    2Last post 14y ago
  • Source Codes for CFPHBy Sprite in CrossFire PH Discussions
    3Last post 15y ago
  • hi, can some1 make a cheat code or find a cheat code for me for this game i play onliBy CrUsHa in General Game Hacking
    37Last post 20y ago

Tags for this Thread

None