Originally Posted by
msflames3
Oooo i gettt ittt
thank yo! Im gonna try that right now. Anf hile im at it. Draw ox i did the same thing. I put lobals and everything under cbase. And i put the last line under menu hotkey and i d/c. I think its my base
EDIT:I still d/c with the circle... let me get this straight.
Globals go at the almost very top. After glboals go right under the globals. D3DCreateline or w/e goes right before d3dcreatefont. Then the endscewne thing goes with my xhair in the render place?
cuz i did that and i d/c..
D3DX stuff D/Cs now, as in ID3DXLine/Font.
For the crosshair, instead just do this :
Code:
void DrawLine(int x, int y, int x2, int y2, int width, DWORD color, LPDIRECT3DDEVICE9 pDevice)
{
FillRGB(x, y, x2 - x, y2 - y, color, pDevice);
}
Then all you need to do is get the viewport by doing
DEVICE->GetViewport(...);
and then draw the crosshair :
Code:
//I used oViewport for my viewport
DrawLine((oViewport.Width / 2) - 10, (oViewport.Height / 2), (oViewport.Width / 2) + 10, (oViewport.Height / 2), 1, D3DCOLOR_XRGB(255,0,0), pDevice);
DrawLine((oViewport.Width / 2), (oViewport.Height / 2) - 10, (oViewport.Width / 2), (oViewport.Height / 2) + 10, 1, D3DCOLOR_XRGB(255,0,0), pDevice);
If that doesn't work, you're hooking incorrectly.