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 › Some code for ESP

SmileSome code for ESP

Posts 1–15 of 38 · Page 1 of 3
CrazyFrost
CrazyFrost
Some code for ESP
Decided to share some code with beginner programmers. Here is not the complete project, but only a part of functions - for ESP.
In my cheat, I have three types of ESP:
1)Display the names of Enemys
2)Show healthbar.
3)draw lines from the center of the screen to the enemy.

WARNING - address in this code - only for RU CF! UPDATE IT FOR YOUR LOCALIZATION! IT'S CODE NOT FOR C+P

Code:
DWORD PlayerClient = *(DWORD*)(ClientShell+0x54);
		if(PlayerClient!=NULL)
		{
			
			  if(GetMeIdxInPlayerInfoList==NULL)
			  {
			  GetMeIdxInPlayerInfoList = (lpGetMeIdxInPlayerInfoList) (CShell + (0x1FD70));//this function return my player index
			  }
			int drawcount=0;
			CPlayer *me = (CPlayer*)((ClientShell + (0x743C+4))+ (GetMeIdxInPlayerInfoList(ClientShell) * 0x4c8));//this is my player
			
			char szFormat[256];
			for(int i=0;i<16;i++)//array of players
			{
				CPlayer * pPlayerInfo = (CPlayer*)((ClientShell + (0x743C+4))+ (i * 0x4c8));
				if(strlen(pPlayerInfo->Name)>2 && pPlayerInfo->Team!=me->Team)//if player have name and his Enemy
				{
					drawcount++;
					if(pPlayerInfo->Health>0)//If Enemy Alive
					{
					   
						sprintf(szFormat,"%s",pPlayerInfo->Name);
						D3DXVECTOR3 pos;
						if(WorldToScreen(pDevice,pPlayerInfo->Object->Head,&pos))//If visible in My Screen
						{
							if(hack1>=1)//first type ESP
							{
							WriteText(szFormat,pos.x,pos.y,Red);//Draw Enemy Name
							if(pPlayerInfo->Has_C4)
							{
								sprintf(szFormat,"%s","C4");
								WriteText(szFormat,pos.x,pos.y+15+15,Red);//Draw what Enemy have C4
							}
							}
						
							if(hack1>=2)//second ESP type
							{
							if(pPlayerInfo->Health>=90)//enemy health is very good
							{
								DrawHealthBar(pos.x,pos.y+15,30,5,Green,Black,pPlayerInfo->Health,100,pDevice);
							}
							else if(pPlayerInfo->Health>=40)//enemy health is not good
							{
								DrawHealthBar(pos.x,pos.y+15,30,5,Yellow,Black,pPlayerInfo->Health,100,pDevice);
							}
							else //enemy health - very bad, you can kill him very easy :)
							{
								DrawHealthBar(pos.x,pos.y+15,30,5,Red,Black,pPlayerInfo->Health,100,pDevice);
							}
							
							}
								int ScreenCenterX = GetSystemMetrics(0) / 2;
								int ScreenCenterY = GetSystemMetrics(1) / 2;
								if(hack1>=3)// DrawLines from center screen to Enemy
								{
								DrawLine(ScreenCenterX,ScreenCenterY,pos.x,pos.y,1,Blue,pDevice);
								}
						}
						
					}
					

				}
			}
		}
What you need for this code:

Code:
void DrawHealthBar(int x, int y, int w, int h, D3DCOLOR color, D3DCOLOR BorderColor, int hp, int maxhp,LPDIRECT3DDEVICE9 g_pDevice)
{
	FillRGB(x, y, ( hp / (double)maxhp ) * w, h, color, g_pDevice);
	DrawBorder(x, y, w, h, BorderColor, g_pDevice);
}
bool WorldToScreen(LPDIRECT3DDEVICE9 pDev, D3DXVECTOR3 vWorld, D3DXVECTOR3* Pos)
{
	D3DVIEWPORT9 viewPort = {0};
	D3DXMATRIX projection, view, world;
  	pDev->GetTransform(D3DTS_VIEW, &view);
	pDev->GetTransform(D3DTS_PROJECTION, &projection);
	pDev->GetTransform(D3DTS_WORLD, &world);
	pDev->GetViewport(&viewPort);
	D3DXVec3Project(Pos, &vWorld, &viewPort, &projection, &view, &world);
	if(Pos->z < 1)
	{
		return true;
	}
	return false;
}

ID3DXLine *pLine = NULL;  
void DrawLine(float x, float y, float x2, float y2, float width, D3DCOLOR color, LPDIRECT3DDEVICE9 pDevice)
{
	if(pLine==NULL)
	{
		D3DXCreateLine( pDevice, &pLine); 
	}
    D3DXVECTOR2 vLine[2];
    pLine->SetWidth( width );
    pLine->SetAntialias( false );
    pLine->SetGLLines( true );
    vLine[0].x = x;
    vLine[0].y = y;
    vLine[1].x = x2;
    vLine[1].y = y2;
    pLine->Begin();
    pLine->Draw( vLine, 2, color );
    pLine->End();
}
and some classes:
Code:
struct cObject
{
     char spacer00[0x4];
         D3DXVECTOR3 Origin;
         D3DXVECTOR3 Head;
};
 
struct UnkStruct
{
        float Pitch;
        float Yaw;
        char spacer00[0xC6];
        bool IsDead;
        char spacer01[0x1647];
        unsigned char CurrentGun;
        char spacer02[0x3];
        bool IsMutant;
};
 
struct CPlayer
{
      //  char spacer00[0x8];
        cObject* Object;
        char ClientID;
        char Team;    
        char Name[12];
        char spacer01[0x2];
        UnkStruct *unk;
        int PlayerSlotTeam;
        int unkstruct1;
        bool Has_C4;
        int State;
        int Rank;
        int unkstruct2;
        int unkstruct3;
        short Health;
        short Kills;
};
How find address for ESP? Its simple - run game with bypass (or use special LoadLib program), attach to game with OllyDbg.
Select "Cshell.dll" module, and use this string for binary scan: "56 8B F1 0F B6 86 ?? ?? ?? ?? 50 E8 ?? ?? ?? ?? 83 C4 04"
after that u see function with desired offsets. use function prototype:
Code:
typedef int (__thiscall *lpGetMeIdxInPlayerInfoList)(unsigned long ulCLTClientShell);
lpGetMeIdxInPlayerInfoList GetMeIdxInPlayerInfoList;
update desired offsets or use this log

Enjoy! Sorry for my English.

Credits: luizimloko &~FALLEN~
can I have someone forgot to add in the credits?
#1 · 13y ago
virganja
virganja
wow


thank you very mush
#2 · 13y ago
chr0me021a
chr0me021a
thank you dude.
#3 · 13y ago
3D
3D
Why share thises ..
#4 · 13y ago
Ryuesi
Ryuesi
Wait for 4846545 Hack now
Why did u share that
#5 · 13y ago
CrazyFrost
CrazyFrost
Quote Originally Posted by Jutie View Post
Wait for 4846545 Hack now
Why did u share that
Most of people can't compile this code
#6 · 13y ago
V
V I
cool story , now everyone have esp source
fucktard.
#7 · 13y ago
luizimloko
luizimloko
the peoples dont know keep the codes for yourself, and share with others. it is that happens
#8 · 13y ago
Zacherl
Zacherl
Quote Originally Posted by kareem111 View Post
Why share thises ..
These classes are public on UC for ages. And @~FALLEN~ posted them in his aimbot source on MPGH long time ago.
#9 · 13y ago
Sirius Blac
Sirius Blac
Quote Originally Posted by REALITY™ View Post
cool story , now everyone have esp source
fucktard.
lol dude stop scold all
#10 · 13y ago
3D
3D
Quote Originally Posted by Zacherl View Post
These classes are public on UC for ages. And @~FALLEN~ posted them in his aimbot source on MPGH long time ago.
Soooooo C+P
#11 · 13y ago
Ryuesi
Ryuesi
Quote Originally Posted by CrazyFrost View Post
Most of people can't compile this code
who said that , anyone know 10% C++ Can Compile it easy
Just call the ESP if u are using D3D Menu at Present/EndScence Hook
#12 · 13y ago
DarkPladin
DarkPladin
Quote Originally Posted by Jutie View Post


who said that , anyone know 10% C++ Can Compile it easy
Just call the ESP if u are using D3D Menu at Present/EndScence Hook
NO Read the code carefully , it needs some thing !
#13 · 13y ago
mamo007
mamo007
thanks for sharing but many will leech it ...
#14 · 13y ago
Dragon(H)ell
Dragon(H)ell
it's 90& working even that most of people here still can't compile it
#15 · 13y ago
Posts 1–15 of 38 · Page 1 of 3

Post a Reply

Similar Threads

  • some codes for ..By YellowDanger in CrossFire Hacks & Cheats
    15Last post 16y ago
  • Imneed Some Codes For HackBy magicwar7 in CrossFire Hack Coding / Programming / Source Code
    22Last post 14y ago
  • I have some Code for user.ini hackBy frostmoon in Mission Against Terror Hacks & Cheats
    12Last post 13y ago
  • some codes for funBy scoutboss in WarRock - International Hacks
    7Last post 16y ago
  • LVL 16 wr account + Working Bypass + Some hacks for a retail codeBy eusker03 in Trade Accounts/Keys/Items
    2Last post 19y ago

Tags for this Thread

None