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 › [TUT] make your own base

[TUT] make your own base

Posts 1–15 of 72 · Page 1 of 5
…
lauwy
lauwy
[TUT] make your own base
Top of the dll
DllMain
______________________
First of all you need to include some files.
In they's fils stant the basic commands.

In iostream std::cout std::cin and more.

You also need windows.h in thise file stand more advanced commands.

You have lots of other file that you can include like time.h and more.
So we begin to include iostream and windows.h

Code:
#include <windows.h>
#include <iostream>
It is also smart to use this command:

Code:
using namespace std;
With this command you don't need to type any more std::.


We need to make a dll file so we start with dllmain. A dll file alway's starts at this point.

I don't going to explain the dll main more becouse I'm lazy:


Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {

}
Now we have a point where the dll starts. Fire you want to know if the DLL is attacht to the process.
But first we are going to DisableThreadLibraryCalls. As far as I know can thise reduce the size of the working set.

Code:
	DisableThreadLibraryCalls(hDll);
If you think where does the hDll come frome, searth the syntacs of

in the dllmaim:
DllMain Callback Function (Windows)
And watch our dll main.

Now we cheack if the dll is attacht:

if ( dwReason == DLL_PROCESS_ATTACH ) {

}

For dwReason, watch the dll main.

Now you can let pop up a msg, do some more commands and more.
First of all we pop up a msg so you know that the dll is injected.

Code:
MessageBoxA(0, "Coded By yourname", "titel", 0);
You can go one in dllmain but the best what you can do is call an other Thread.
Then you have a mutch more cleaner code:

We are going to call the Thread hello

Code:
CreateThread(NULL, NULL, hello, NULL, NULL, NULL);
And then if the dll is not attacht, we let the dll close with out a error:

Code:
return TRUE;

If you put all together:

Code:
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Coded By youname", "Injected", 0);
		CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
	}
	return TRUE;
}
This part of the code I never edit becouse it works perfect

_____________________



Cshell.dll look if it is loaded
________

Now we need to know if cshell.dll is loaded.
We can do that with GetModuleHandleA();

In the function hello we cheak that.

First we make the function

Code:
DWORD WINAPI hello(LPVOID) {

}
We cheack if cshell.dll is loaded:

Code:
GetModuleHandleA("CShell.dll")
We look if cshell is not loaded, and we put a Sleep command if it is not loaded (else it take a lot of our CPU )

Code:
while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); //100ms
}
The while repaids till it is not true any more.
And then we can go one with commands.


Becouse this is only a loop, we don't make a other function.

___________________

Now we are going to make a loop that cheaks if the user inputs a button, and if he does. We can enable a hack.
But fist we start our loop.

While(1) or for(;

Both loops are good. I alway's use For so:

Code:
For(;;)
A while loop you can compair 2 "things" like 1 == 1 or 1 > 5 and more.
With a for loop you can do more.

Like this:
for(int a=0;a==10;a++) {

}

This loop loops 10 times.
This also can be don with a while loop but thise one takes less space.

In the for loop we put first our configuration.
And blood sais that you need to put __asm pushad; in the begin of the loop to bypass the securety.
And at the end: __asm popad;


Code:
for(;;) {
	__asm pushad;

	__asm popad;
}
Then out configuration, so we know if the hack is enabled or nor:

Code:
	bool boxes = true;
	bool nosky = false;
	bool worldframe = false;
	bool playerframe = false;
	bool nogun = false;
	bool Skeleton = false;
	bool FogEnable = false;
	bool CursorCenter = false;
A bool can be true or false.
a int can be a number
...
.
.
.
.
.

Then we cheak if a button is pressed:

Code:
if(GetAsyncKeyState(VK_NUMPAD1)&1) {
	
}
Here you can see that numpad 1 is pressed.
And if he is pressed I want to enable or disable boxes:

Code:
if(GetAsyncKeyState(VK_NUMPAD1)&1) {
		boxes = !boxes;	//(if boxes is true then will it be false and false wil be true)
}
You put here all you hotkey's

Then we enable the hack if one is pressed:

Code:
if (CursorCenter) {
		PushToConsole("CursorCenter 1");
} else { 
	PushToConsole("CursorCenter 0");
}
The PushToConsole function will come later.
For PushToConsole commands searth the forum.

Here you add all your hacks...

And to spare your cpu:
Sleep(100);

before
__asm popad

So it will look like:

Code:
While (GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); //100ms
}


for(;;) {
__asm pushad;
		if(GetAsyncKeyState(VK_NUMPAD1)&1) {
			boxes = !boxes;
		}
		if(GetAsyncKeyState(VK_NUMPAD2)&1) {
			nosky = !nosky;
		}
		if(GetAsyncKeyState(VK_NUMPAD3)&1) {
			worldframe = !worldframe;
		}
		if(GetAsyncKeyState(VK_NUMPAD4)&1) {
			playerframe = !playerframe;
		}
		if(GetAsyncKeyState(VK_NUMPAD5)&1)	{
			nogun = !nogun;
		}
		if(GetAsyncKeyState(VK_NUMPAD6)&1)	{
			Skeleton = !Skeleton;
		}
		if(GetAsyncKeyState(VK_NUMPAD7)&1)	{
			FogEnable = !FogEnable;
		}
		if(GetAsyncKeyState(VK_NUMPAD8)&1)	{
			CursorCenter = !CursorCenter;
		}

		if (CursorCenter) {
			PushToConsole("CursorCenter 1");
		} 
		else {
			PushToConsole("CursorCenter 0");
		}

		if (FogEnable) {
			PushToConsole("FogEnable 1");
		} 
		else {
			PushToConsole("FogEnable 0");
		}

		if (Skeleton) {
			PushToConsole("ModelDebug_DrawSkeleton 1"); 
		}
		else {
			PushToConsole("ModelDebug_DrawSkeleton 0"); 
		}

		if  (boxes) {
			PushToConsole("ModelDebug_DrawBoxes 1");
		}
		else {
			PushToConsole("ModelDebug_DrawBoxes 0");
		}

		if  (nosky) {
			PushToConsole("DrawSky 0");
		}
		else {
			PushToConsole("DrawSky 1");
		}

		if  (worldframe) {
			PushToConsole("WireFrame 1");
		}
		else {
			PushToConsole("WireFrame 0");
		}

		if  (playerframe) {
			PushToConsole("WireFrameModels 1");
		}
		else {
			PushToConsole("WireFrameModels 0");
		}

		if  (nogun) {
			PushToConsole("DrawGuns 0");
		}
		else {
			PushToConsole("DrawGuns 1");
		}
		Sleep(100);
		__asm popad;
}

________________

The PTC I coppied from bloof and put the new LTClient in it.

Code:
void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}
If you think why, becouse it works fine

All together:


Code:
#include <windows.h>
#include <iostream>

using namespace std;

void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell + 0x299D40) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}


DWORD WINAPI hello(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); //100ms
}

	bool boxes = true; //enable becouse in xp the hotkey's don't work
	bool nosky = false;
	bool worldframe = false;
	bool playerframe = false;
	bool nogun = false;
	bool Skeleton = false;
	bool FogEnable = false;
	bool CursorCenter = false;


for(;;) {
	__asm pushad;
			if(GetAsyncKeyState(VK_NUMPAD1)&1) {
				boxes = !boxes;
			}
			if(GetAsyncKeyState(VK_NUMPAD2)&1) {
				nosky = !nosky;
			}
			if(GetAsyncKeyState(VK_NUMPAD3)&1) {
				worldframe = !worldframe;
			}
			if(GetAsyncKeyState(VK_NUMPAD4)&1) {
				playerframe = !playerframe;
			}
			if(GetAsyncKeyState(VK_NUMPAD5)&1)	{
				nogun = !nogun;
			}
			if(GetAsyncKeyState(VK_NUMPAD6)&1)	{
				Skeleton = !Skeleton;
			}
			if(GetAsyncKeyState(VK_NUMPAD7)&1)	{
				FogEnable = !FogEnable;
			}
			if(GetAsyncKeyState(VK_NUMPAD8)&1)	{
				CursorCenter = !CursorCenter;
			}

			if (CursorCenter) {
				PushToConsole("CursorCenter 1");
			} 
			else {
				PushToConsole("CursorCenter 0");
			}

			if (FogEnable) {
				PushToConsole("FogEnable 1");
			} 
			else {
				PushToConsole("FogEnable 0");
			}

			if (Skeleton) {
				PushToConsole("ModelDebug_DrawSkeleton 1"); 
			}
			else {
				PushToConsole("ModelDebug_DrawSkeleton 0"); 
			}

			if  (boxes) {
				PushToConsole("ModelDebug_DrawBoxes 1");
			}
			else {
				PushToConsole("ModelDebug_DrawBoxes 0");
			}

			if  (nosky) {
				PushToConsole("DrawSky 0");
			}
			else {
				PushToConsole("DrawSky 1");
			}

			if  (worldframe) {
				PushToConsole("WireFrame 1");
			}
			else {
				PushToConsole("WireFrame 0");
			}

			if  (playerframe) {
				PushToConsole("WireFrameModels 1");
			}
			else {
				PushToConsole("WireFrameModels 0");
			}

			if  (nogun) {
				PushToConsole("DrawGuns 0");
			}
			else {
				PushToConsole("DrawGuns 1");
			}
			Sleep(100);
			__asm popad;
	}
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Coded By youname", "Injected", 0);
		CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
	}
	return TRUE;
}

Put all function above the main function, else you need to say c++ that the functions are under the main function


___


GL
Sorry for my very very bad englise.
#1 · edited 16y ago · 16y ago
BA
BadBlood
Awesome . man Good job
#2 · 16y ago
shefoalaao
shefoalaao
not working for me there is building error PM me om MSN plz
#3 · 16y ago
Hahaz
Hahaz
@lauwy, this is what i like about u, always sharing something useful for us
#4 · 16y ago
lauwy
lauwy
Haha, Thanks

Quote Originally Posted by shefoalaao View Post
not working for me there is building error PM me om MSN plz

Whate error do you get?
#5 · 16y ago
MR
mrkiller2010
Nice i got onw now
#6 · 16y ago
TH
TheFallenOwns
not exactly a good base but w/e good job i guess
but why would you use the using namespace std; i mean it might just be me but i have never used anything in the std namespace when making a hotkey or D3D base
#7 · 16y ago
lauwy
lauwy
That's true, but I alway's include it
And what part of the base is not good?
#8 · 16y ago
MR
mrkiller2010
Good hah very goood
#9 · 16y ago
ClamPie
ClamPie
Quote Originally Posted by hahaz View Post
@lauwy, this is what i like about u, always sharing something useful for us
Not to mention he just joined the site too...already on the good foot.
#10 · 16y ago
lauwy
lauwy
My first hack release was with 11 posts, they thought It was a virus or that I was a leecher :P

Now I want to learn how to D3D :P Then I can make a other tutorial :P haha
#11 · 16y ago
GC
gcflames12
Im Learning D3D now!! im on Section 3 Advanced pg 782 (: but lauwy my computer is broken so i havent been on Xfire lately -_-
#12 · 16y ago
lauwy
lauwy
ahh, that's why I never saw you :P
What book are you using?
#13 · 16y ago
speedforyou
speedforyou
it is basicaly a combat arms base???
99% of it is
#14 · 16y ago
MR
Mr.Mageman
Quote Originally Posted by speedforyou View Post
it is basicaly a combat arms base???
99% of it is
Its basicly a base for Lithtech running games...
#15 · 16y ago
Posts 1–15 of 72 · Page 1 of 5
…

Post a Reply

Similar Threads

  • [TuT] Make Your Own Clean.BatBy Recreation in WarRock - International Hacks
    4Last post 18y ago
  • (TUT)how to make your own warrock menuBy aprill27 in WarRock - International Hacks
    0Last post 19y ago
  • [TuT] How to make your own toolbar easily!By johnny608 in Programming Tutorials
    3Last post 17y ago
  • {TUT} How to make your own opk hackBy mandog10 in Combat Arms Hacks & Cheats
    28Last post 18y ago
  • [TuT] How to make your own tagsBy Joshcarr2006 in CrossFire Hacks & Cheats
    28Last post 17y ago

Tags for this Thread

None