How to use this code ??

Posts 1–5 of 5 · Page 1 of 1
How to use this code ??
Hi

Someone create this for me:

LPDIRECT3DDEVICE9 pDevice = NULL;

void FillColor( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
if( w < 0 )w = 1;
if( h < 0 )h = 1;
if( x < 0 )x = 1;
if( y < 0 )y = 1;

D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}

if( Menu.mOpt[1].nopt > 0 ){
D3DCOLOR xcolor = D3DCOLOR_ARGB( 255, 255, 0, 0 );

int size = 25, strong = 3;
int iCenterX = GetSystemMetrics( 0 ) / 2;
int iCenterY = GetSystemMetrics( 1 ) / 2;
if( iCenterX < 20 && iCenterY < 20 )
{
iCenterX = ( GetSystemMetrics( 0 ) / 2 );
iCenterY = ( GetSystemMetrics( 1 ) / 2 );
}
D3DRECT rec2 = { iCenterX- size, iCenterY, iCenterX+ size, iCenterY+ strong};
D3DRECT rec3 = { iCenterX, iCenterY- size, iCenterX+ strong,iCenterY+ size};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 0, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 0, 0);
}
But i dont know how to use it =s
Someone can make me a tutorial for use that or explain me, it will e really nice =)
I'm a naab in programation,C++,and all

(Its for a crosshair when i noscope with a snip) x)

And sorry for my very bad english !
lawl

I prefer have a real crosshair xD
Someone can help me
?
well i dont know that someone will give you the exact code of the crosshair..
i recommend you to learn c++
or reaD some guides..
Download a C++ compiler, i recommend Microsoft Visual C++ 2008 Express Editon (it's free).
Then download DirectX SDK and install it.
after that, you will be able to compile this code.
by the way, this will not work for you cause there is no declare for the "Menu" item.
and you need a main function.

i suggest you to learn C++
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us