Try use the xHair function from my base. Easy to use and do + it's already predone for you
Oh btw.
Code:globals: #define Color D3DCOLORshothere
Hi I made some d3d9 crosshairs using the d3d9 starter kit 3.0 and I built it and everything is fine then when i go in-game and try to turn it on nothing happens then it crashes?
then in globalsCode:HRESULT APIENTRY hkIDirect3DDevice9::EndScene() { if(crosshair) { D3DRECT rec2 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+2}; D3DRECT rec3 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 2,ScreenCenterY+20}; m_pD3Ddev->Clear(1, &rec2, D3DCLEAR_TARGET,color, 0, 0); m_pD3Ddev->Clear(1, &rec3, D3DCLEAR_TARGET,color, 0, 0); } if(GetAsyncKeyState(VK_NUMPAD0) & 1) { crosshair = !crosshair; } return m_pD3Ddev->EndScene(); }
Code:float ScreenCenterX = 0.0f; float ScreenCenterY = 0.0f; bool crosshair = false; D3DCOLOR color = D3DCOLOR_XRGB( 200, 0, 0 );
Try use the xHair function from my base. Easy to use and do + it's already predone for you
Oh btw.
Code:globals: #define Color D3DCOLORshothere
Last edited by flameswor10; 03-16-2011 at 04:28 AM.
@PashaAmd Moved to C++ section, these guys can help alot.
Hmm, clearing a certain area of the screen to draw a crosshair. o_O
Everything looks right to me. It's probably the 'hack' part of your code that isn't working.
try to use a SetPixel function instead...
If you're still unable to get it to work give D3DXLINE a try, they're quite easy to use. Look for examples on google.
Ah we-a blaze the fyah, make it bun dem!
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]