Use this function:
Code:
void DrawLine(float x, float y, float x2, float y2, float width, DWORD color)
{
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();
}
To Draw it:
Code:
DrawLine(StartposX,StartposY,EndposX,EndposY,Thickness,Color);
Change the words in orange to what ever coordinates u want.
Im not sure why ur doing this but if its for a X hair use this.
Code:
DrawLine(ScreenCenterX+10,ScreenCenterY+10,ScreenCenterX-10,ScreenCenterY-10,1,Red);
DrawLine(ScreenCenterX-10,ScreenCenterY+10,ScreenCenterX+10,ScreenCenterY-10,1,Red);
This is how i do it, maybe there is an easier way but yeah.
Enjoy (: