Problem, I need help.

Posts 115 of 24 · Page 1 of 2
Problem, I need help.
This is the code I'm using thanks to Rusty.

Code:
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color) 
{ 
	DrawCircle(CenterX,CenterY,8,8,RED);
    D3DXVECTOR2 Line[128]; 
    float Step = PI * 2.0 / numSides; 
    int Count = 0; 
    for (float a=0; a < PI*2.0; a += Step) 
    { 
        float X1 = radius * cos(a) + X; 
        float Y1 = radius * sin(a) + Y; 
        float X2 = radius * cos(a+Step) + X; 
        float Y2 = radius * sin(a+Step) + Y; 
        Line[Count].x = X1; 
        Line[Count].y = Y1; 
        Line[Count+1].x = X2; 
        Line[Count+1].y = Y2; 
        Count += 2; 
    } 
    pLine->Begin(); 
    pLine->Draw(Line,Count,Color); 
    pLine->End(); 
}
I'm using Visual Studio 2010, and it says that pLine is not defined.

How could I fix that, might be an easy fix but I'm not ashamed to ask because I'm a starter and hope to learn from my mistakes.
declare this; ID3DXLine *pLine;

Hope this help you.
Quote Originally Posted by anaestheist View Post
declare this; ID3DXLine *pLine;

Hope this help you.
Thank you so much, Rep++
Quote Originally Posted by anaestheist View Post
declare this; ID3DXLine *pLine;

Hope this help you.
[php]ID3DXLine *pLine;
D3DXCreateLine(pDevice,&D3D.pLine);[/php]

when u not use this the game crash
Quote Originally Posted by kotentopf View Post
[php]ID3DXLine *pLine;
D3DXCreateLine(pDevice,&D3D.pLine);[/php]

when u not use this the game crash
you beat me to it
Was about to say, You still need to create your line

&& to use it, Just do

if(hack == 1) {
DrawCircle(...);
}
Post in source code help disscussion section next time
Quote Originally Posted by anaestheist View Post
I luv whit /
I saw him first! Jking
well props to anaethiest for helping

but Ghost dude in C++ u have to define things.. u should really start out with the basic syntax
Im happy to help when i can :P i am also beginning in C++.
Quote Originally Posted by anaestheist View Post
Im happy to help when i can :P i am also beginning in C++.
same here. I started with hotkey hack and then went onto menu.
then I thought it was stupid and actually started to learn to program.
the only difference is that I googled my errors and learned off of the bases and I didn't come here with all of my questions i just took the time to figure it out.

mind you back then it was a lot easier
I have another question which I think I can answer but for some apparent reason the method I'm using does not work, here is my code,

Code:
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color) 
{ 
	DrawCircle(CenterX,CenterY,8,8,RED);
    D3DXVECTOR2 Line[128]; 
    float Step = PI * 2.0 / numSides; 
    int Count = 0; 
    for (float a=0; a < PI*2.0; a += Step) 
    { 
        float X1 = radius * cos(a) + X; 
        float Y1 = radius * sin(a) + Y; 
        float X2 = radius * cos(a+Step) + X; 
        float Y2 = radius * sin(a+Step) + Y; 
        Line[Count].x = X1; 
        Line[Count].y = Y1; 
        Line[Count+1].x = X2; 
        Line[Count+1].y = Y2; 
        Count += 2; 
    } 
    pLine->Begin(); 
    pLine->Draw(Line,Count,Color); 
    pLine->End();
}
and here is my method,

Code:
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color) 
{ 
	if (hack7 == 1)show=(show);
	DrawCircle(CenterX,CenterY,8,8,RED);
    D3DXVECTOR2 Line[128]; 
    float Step = PI * 2.0 / numSides; 
    int Count = 0; 
    for (float a=0; a < PI*2.0; a += Step) 
    { 
        float X1 = radius * cos(a) + X; 
        float Y1 = radius * sin(a) + Y; 
        float X2 = radius * cos(a+Step) + X; 
        float Y2 = radius * sin(a+Step) + Y; 
        Line[Count].x = X1; 
        Line[Count].y = Y1; 
        Line[Count+1].x = X2; 
        Line[Count+1].y = Y2; 
        Count += 2; 
    } 
    pLine->Begin(); 
    pLine->Draw(Line,Count,Color); 
    pLine->End();
}
Can anyone care to explain to me why the crosshair's do not show up in-game when I put "Hack7" On?
Quote Originally Posted by -xGhost- View Post
I have another question which I think I can answer but for some apparent reason the method I'm using does not work, here is my code,

Code:
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color) 
{ 
	DrawCircle(CenterX,CenterY,8,8,RED);
    D3DXVECTOR2 Line[128]; 
    float Step = PI * 2.0 / numSides; 
    int Count = 0; 
    for (float a=0; a < PI*2.0; a += Step) 
    { 
        float X1 = radius * cos(a) + X; 
        float Y1 = radius * sin(a) + Y; 
        float X2 = radius * cos(a+Step) + X; 
        float Y2 = radius * sin(a+Step) + Y; 
        Line[Count].x = X1; 
        Line[Count].y = Y1; 
        Line[Count+1].x = X2; 
        Line[Count+1].y = Y2; 
        Count += 2; 
    } 
    pLine->Begin(); 
    pLine->Draw(Line,Count,Color); 
    pLine->End();
}
and here is my method,

Code:
void DrawCircle(int X, int Y, int radius, int numSides, DWORD Color) 
{ 
	if (hack7 == 1)show=(show);
	DrawCircle(CenterX,CenterY,8,8,RED);
    D3DXVECTOR2 Line[128]; 
    float Step = PI * 2.0 / numSides; 
    int Count = 0; 
    for (float a=0; a < PI*2.0; a += Step) 
    { 
        float X1 = radius * cos(a) + X; 
        float Y1 = radius * sin(a) + Y; 
        float X2 = radius * cos(a+Step) + X; 
        float Y2 = radius * sin(a+Step) + Y; 
        Line[Count].x = X1; 
        Line[Count].y = Y1; 
        Line[Count+1].x = X2; 
        Line[Count+1].y = Y2; 
        Count += 2; 
    } 
    pLine->Begin(); 
    pLine->Draw(Line,Count,Color); 
    pLine->End();
}
Can anyone care to explain to me why the crosshair's do not show up in-game when I put "Hack7" On?
Try this;

if (hack7 == 1) show = !show;

Doubt it work anyway, i don't see anywhere in your code where it would hide/show the crosshair? correct me if im wrong..
why do you even have the if(hack7 == 1) in your draw circle?

You also can not call drawCircle inside of the code where you define it, take the two lines:
Code:
if(hack7==1){
    CrawCircle()
and move it out of the void.

Also the hack7=(!hack7) will just instantly turn it back off.
[php] if (needstolearncplusplus7 == 1) {
learn c++ () [/php]

try that, it works!
Posts 115 of 24 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?