int Line = 0;
if(Line == 0 && *(BYTE*)0x377767B0 != 1){//GameStatus
D3DXCreateLine(pDevice,&pLine); //Creates when CA opens
Line = 1;
}
if(Line == 1 && *(BYTE*)0x377767B0 == 1){//GameStatus
D3DXCreateLine(pDevice,&pLine);//Creates ONCE when you go into game... then changes int Line so it doesnt recreate
Line = 2;
}
if(Line == 2 && *(BYTE*)0x377767B0 != 1)//GameStatus
{
Line = 1;//Changes back to int 1, so when you join game it recreates once again
}



if( Menu.g_pLine == 0 )
D3DXCreateLine( pDevice, &Menu.g_pLine );
else
{
if (L_pDevice != pDevice)
L_pDevice = pDevice;
try
{
if (Menu.g_pLine != 0)
Menu.g_pLine->Release();
} catch (...) {}
Menu.g_pLine = 0;
D3DXCreateLine( pDevice, &Menu.g_pLine );
}

struct D3DTLVERTEX
{
float x, y, z, rhw;
DWORD color;
};
struct DXUT_SCREEN_VERTEX
{
float x, y, z, h;
D3DCOLOR color;
float tu, tv;
static DWORD FVF;
};
void DrawLine( LPDIRECT3DDEVICE9 pDevice, float X, float Y, float X2, float Y2, DWORD dwColor )
{
if( !pDevice )
return;
D3DTLVERTEX qV[2] =
{
{ (float)X, (float)Y, 0.0f, 1.0f, dwColor },
{ (float)X2, (float)Y2, 0.0f, 1.0f, dwColor },
};
pDevice->DrawPrimitiveUP( D3DPT_LINELIST, 1, qV, sizeof( D3DTLVERTEX ) );
}