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 › Programming › Game Development › DirectX/D3D Development › Simple D3D9 Aimbot

Simple D3D9 Aimbot

Posts 16–30 of 51 · Page 2 of 4
VE
ves23
Quote Originally Posted by lvous View Post
I don't play anymore but I used this:

Logged the shader
// cbPerObjectBones c0 204
// cbSharedPerView c204 4
// cbPerObject c223 4

and then by trial and error:
Code:
D3DXMATRIX ProjMatrix, ViewMatrix, WorldMatrix;
D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, 0);

Device->GetVertexShaderConstantF(204, ProjMatrix, 4); 
Device->GetVertexShaderConstantF(223, ViewMatrix, 4); 

D3DXMatrixIdentity(&WorldMatrix);
D3DXMatrixTranspose(&ViewMatrix, &ViewMatrix);
D3DXMatrixTranspose(&ProjMatrix, &ProjMatrix);

D3DXVec3Project(&VectorMiddle, &pModel->Position3D, &Viewport, &ProjMatrix, &ViewMatrix, &WorldMatrix);

if (VectorMiddle.z < 1.0f && ProjMatrix._44 < 1.0f) //not sure
{
	pModel->Position2D.x = VectorMiddle.x;
	pModel->Position2D.y = VectorMiddle.y;
}
I don't see any boxes now, am I missing something? :P
Code:
void Worldtoscreen(LPDIRECT3DDEVICE9 Device)
{
	ModelInfo_t* pModel = new ModelInfo_t;

	D3DXMATRIX ProjMatrix, ViewMatrix, WorldMatrix;
	D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, 0);

	Device->GetVertexShaderConstantF(204, ProjMatrix, 4); 
	Device->GetVertexShaderConstantF(223, ViewMatrix, 4); 

	D3DXMatrixIdentity(&WorldMatrix);
	D3DXMatrixTranspose(&ViewMatrix, &ViewMatrix);
	D3DXMatrixTranspose(&ProjMatrix, &ProjMatrix);

	D3DXVec3Project(&VectorMiddle, &pModel->Position3D, &Viewport, &ProjMatrix, &ViewMatrix, &WorldMatrix);

	if (VectorMiddle.z < 1.0f && ProjMatrix._44 < 1.0f) //not sure
	{
		pModel->Position2D.x = VectorMiddle.x;
		pModel->Position2D.y = VectorMiddle.y;
	}
}
#16 · 11y ago
lvous
lvous
Quote Originally Posted by ves23 View Post
I don't see any boxes now, am I missing something? :P
can't test but remove this line "if (VectorMiddle.z < 1.0f && ProjMatrix._44 < 1.0f)" and look if it works. If not, you have to log the shader and look whether or not this changed:
// cbSharedPerView c204 4
// cbPerObject c223 4
#17 · 11y ago
VE
ves23
Quote Originally Posted by lvous View Post
223
I don't know how to log the shader. Is it bad if I use stride and set texture? I had problems with set pixel shader, models would become transparent in heroes and generals, and I dont know to make them work
#18 · 11y ago
lvous
lvous
Quote Originally Posted by ves23 View Post
I don't know how to log the shader. Is it bad if I use stride and set texture? I had problems with set pixel shader, models would become transparent in heroes and generals, and I dont know to make them work
Stride and SetTexture(1.. worked for me, pixel shader was buggy. To log the shader use this:
Code:
void doDisassembleShader(LPDIRECT3DDEVICE9 pDevice,char* FileName)
{
    std::ofstream oLogFile(FileName,std::ios::trunc);
    if (!oLogFile.is_open())
        return;
    IDirect3DVertexShader9* pShader;
    pDevice->GetVertexShader(&pShader);
    UINT pSizeOfData;
    pShader->GetFunction(NULL,&pSizeOfData);
    BYTE* pData = new BYTE[pSizeOfData];
    pShader->GetFunction(pData,&pSizeOfData);
    LPD3DXBUFFER bOut;
    D3DXDisassembleShader(reinterpret_cast<DWORD*>(pData),NULL,NULL,&bOut);
    oLogFile << static_cast<char*>(bOut->GetBufferPointer()) << std::endl;
    oLogFile.close();
    delete[] pData;
    pShader->Release();
}

in drawindexedp:

if(Stride == 40)
if (GetAsyncKeyState(VK_F9) & 1)
	doDisassembleShader(pDevice, "shader1.txt");
or
if (GetAsyncKeyState(VK_F10) & 1)
if(Stride == 40)
	doDisassembleShader(pDevice, "shader2.txt");
#19 · 11y ago
VE
ves23
Quote Originally Posted by lvous View Post
Stride and SetTexture(1.. worked for me, pixel shader was buggy. To log the shader use this:
Logged the pixel shader = pastebin . com/e35jXu32
and the vertex shader = pastebin . com/wuuNFZCc
#20 · 11y ago
lvous
lvous
Quote Originally Posted by ves23 View Post
Logged the pixel shader = pastebin . com/e35jXu32
and the vertex shader = pastebin . com/wuuNFZCc
Looks similar to what I logged two patches ago, so worldtoscreen should work. I left out GetViewport maybe that's the problem?
Code:
..
Device->GetViewport(&Viewport);
Device->GetVertexShaderConstantF(204, ProjMatrix, 4); 
Device->GetVertexShaderConstantF(223, ViewMatrix, 4); 
..
#21 · 11y ago
VE
ves23
Quote Originally Posted by lvous View Post
Looks similar to what I logged two patches ago, so worldtoscreen should work. I left out GetViewport maybe that's the problem?
Code:
..
Device->GetViewport(&Viewport);
Device->GetVertexShaderConstantF(204, ProjMatrix, 4); 
Device->GetVertexShaderConstantF(223, ViewMatrix, 4); 
..
Works :P puu.sh/hjnd7/c3444eb5e3.jpg Aiming at feet, but I guess I'll find the head chams, or body chams. Or maybe just fix the Y coord where the mouse goes.

Thanks for your source, your time, and the will to help some random guy

Code:
void Worldtoscreen(LPDIRECT3DDEVICE9 Device)
{
	ModelInfo_t* pModel = new ModelInfo_t;

	D3DXMATRIX ProjMatrix, ViewMatrix, WorldMatrix;
	D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, 0);

	Device->GetViewport(&Viewport);
	Device->GetVertexShaderConstantF(204, ProjMatrix, 4); 
	Device->GetVertexShaderConstantF(223, ViewMatrix, 4); 

	D3DXMatrixIdentity(&WorldMatrix);
	D3DXMatrixTranspose(&ViewMatrix, &ViewMatrix);
	D3DXMatrixTranspose(&ProjMatrix, &ProjMatrix);

	D3DXVec3Project(&VectorMiddle, &pModel->Position3D, &Viewport, &ProjMatrix, &ViewMatrix, &WorldMatrix);

// 	if (VectorMiddle.z < 1.0f && ProjMatrix._44 < 1.0f) //not sure
// 	{
		pModel->Position2D.x = VectorMiddle.x;
		pModel->Position2D.y = VectorMiddle.y;
	//}
	ModelInfo.push_back(pModel);
}
#22 · 11y ago
lvous
lvous
Quote Originally Posted by ves23 View Post
Works :P puu.sh/hjnd7/c3444eb5e3.jpg Aiming at feet, but I guess I'll find the head chams, or body chams. Or maybe just fix the Y coord where the mouse goes.

Thanks for your source, your time, and the will to help some random guy
Glad it works, I think you can adjust height if you edit the last value of ScreenMiddle or pModel->Position3D somehow, try this:
Code:
..
D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, (float)aimheight);
pModel->Position3D = ScreenMiddle;
..
#23 · 11y ago
VE
ves23
Even if I use the head only chams, its still drawing a box, aiming at the feet. Why is that?
#24 · 11y ago
VE
ves23
All's working good now. Thanks once again.

puu.sh/hl7G6/70572b3f7e.jpg
#25 · 11y ago
Jhem
Jhem
Quote Originally Posted by lvous View Post
Glad it works, I think you can adjust height if you edit the last value of ScreenMiddle or pModel->Position3D somehow, try this:
Code:
..
D3DXVECTOR3 VectorMiddle(0, 0, 0), ScreenMiddle(0, 0, (float)aimheight);
pModel->Position3D = ScreenMiddle;
..
Hey I can use this W2S? too.

Code:
bool WorldToScreen(D3DXVECTOR3 inpos, D3DXVECTOR3 &outpos, LPDIRECT3DDEVICE9 pDevice)
{
	DWORD dwRenderData = (DWORD)GetModuleHandleA("i3GfxDx.dll") + 00000;
	CRenderData* RenderData = (CRenderData*)(dwRenderData);

	D3DXVECTOR3 vScreen;
	D3DVIEWPORT9 g_ViewPort;

	pDevice->GetViewport(&g_ViewPort);
	g_ViewPort.X = g_ViewPort.Y = 0;
	g_ViewPort.MinZ = 0;
	g_ViewPort.MaxZ = 1;
	D3DXVec3Project(&vScreen, &inpos, &g_ViewPort,
		&RenderData->RenderData->ProjectMatrix,
		&RenderData->RenderData->ViewMatrix,
		&RenderData->RenderData->WorldMatrix);

	if (vScreen.z < 1.0f && vScreen.x > 0.0f && vScreen.y > 0.0f && vScreen.x < g_ViewPort.Width && vScreen.y < g_ViewPort.Height)
	{
		outpos.x = vScreen.x;
		outpos.y = vScreen.y;
		outpos.z = vScreen.z;

		return true;
	}

	return false;
}
#26 · 11y ago
lvous
lvous
Quote Originally Posted by Jhem View Post
Hey I can use this W2S? too.

Code:
bool WorldToScreen(D3DXVECTOR3 inpos, D3DXVECTOR3 &outpos, LPDIRECT3DDEVICE9 pDevice)
{
	DWORD dwRenderData = (DWORD)GetModuleHandleA("i3GfxDx.dll") + 00000;
	CRenderData* RenderData = (CRenderData*)(dwRenderData);
..
which game pointblank? if you have the classes and the right offset then yes
#27 · 11y ago
VE
ves23
Ivous, I require your help again, doing it now for a different game, UE3 Engine.

Logged this
Code:
//   ViewProjecti********  c0       4
//   CameraPosition       c4       1
//   BoneMatrices         c5     225
//   LocalToWorld         c230     4
//   WorldToLocal         c234     3
Which one am I supposed to use? I've tried them all, if I use 4, it kinda works, rotating my screen moves the boxes, but they're all in the middle of my screen

Code:
Device->GetVertexShaderConstantF(0, ProjMatrix, 4); 
Device->GetVertexShaderConstantF(4, ViewMatrix, 4);
I can make videos, if needed
#28 · edited 11y ago · 11y ago
lvous
lvous
Quote Originally Posted by ves23 View Post
Ivous, I require your help again, doing it now for a different game, UE3 Engine.

Logged this
Code:
//   ViewProjecti********  c0       4
//   CameraPosition       c4       1
//   BoneMatrices         c5     225
//   LocalToWorld         c230     4
//   WorldToLocal         c234     3
Which one am I supposed to use? I've tried them all, if I use 4, it kinda works, rotating my screen moves the boxes, but they're all in the middle of my screen

Code:
Device->GetVertexShaderConstantF(0, ProjMatrix, 4); 
Device->GetVertexShaderConstantF(4, ViewMatrix, 4);
I can make videos, if needed
use viewprojection & localtoworld

Code:
Device->GetVertexShaderConstantF(0, ProjMatrix, 4);
Device->GetVertexShaderConstantF(230, ViewMatrix, 4);

D3DXMatrixIdentity(&WorldMatrix);
D3DXVec3Project..
#29 · 11y ago
VE
ves23
Quote Originally Posted by lvous View Post
use viewprojection & localtoworld

Code:
Device->GetVertexShaderConstantF(0, ProjMatrix, 4);
Device->GetVertexShaderConstantF(230, ViewMatrix, 4);

D3DXMatrixIdentity(&WorldMatrix);
D3DXVec3Project..
Using viewprojection & localtoworld, no boxes are being drawn, heres the full shader log pastebin.com/1m39x6a5
#30 · 11y ago
Posts 16–30 of 51 · Page 2 of 4

Post a Reply

Similar Threads

  • simple unpatched aimbot plixBy DanOfAwsome in Combat Arms Discussions
    2Last post 14y ago
  • A simple undetected aimbotBy tylormartin in Battlefield 3 (BF3) Hacks & Cheats
    1Last post 13y ago
  • Simple [Aimbot]By tabuzo013 in General
    8Last post 15y ago
  • How To make your own simple AimbotBy sumsar1812 in Battlefield Heroes Hacks
    41Last post 16y ago
  • Simple aimbot source codeBy yusako in Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    23Last post 15y ago

Tags for this Thread

#pure d3d aimbot