# SolvedGetting enemies vec3 position addresses?

#### Ollie

##### Newbie
Full Member
Hey.

I know how to get my own position addresses and static ones for them,
but where would i start finding the enemies addresses and amount of enemies?

I think the positions are needed to code an esp, and haven't found a tutorial about that yet.

So are there any tuts on this?

Thanks.

#### Ollie

##### Newbie
Full Member
Thanks, I guess something like that would do.
Now I've gotta find out how to draw rectangles on D3D/GL

#### c5

##### Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
You can use that func, which Alex provided, with this for ultimate easieness

C++:
``````void Box( float x, float y, float w, float h, float t, float bt, bool border, DWORD fcol, DWORD bcol )
{
if(border)
{
FillRGBA(x-t/2-1, y-t/2-1, w+t+2, t+2, bcol );
FillRGBA(x-t/2-1, y-t/2-1, t+2, h+t+2, bcol );
FillRGBA(x-t/2-1, y+h-t/2-1, w+t+2, t+2, bcol );
FillRGBA(x+w-t/2-1, y-t/2-1, t+2, h+t+2, bcol );
}

FillRGBA(x-t/2, y-t/2, w+t, t, fcol );
FillRGBA(x-t/2, y-t/2, t, h+t, fcol );
FillRGBA(x-t/2, y+h-t/2, w+t, t, fcol );
FillRGBA(x+w-t/2, y-t/2, t, h+t, fcol );
}``````

#### c5

##### Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
What is that code attempting to do? draw A box with a boarder around it? that would only require 2 FillRGBA calls.
Yea, thats what it does. But I just noticed I have my FillRGBA littlebit different than the one you provided, so yeah that might be littlebit off, my bad

#### Ollie

##### Newbie
Full Member
Oh wow, thanks for all the nice replies!

I've still got one question:

Where can I find more information about hooking to OpenGL/DirectXD3D and how to actually create a dll with a little drawing function inside?

I've heard something about detour functions, is this related to the hooking?

#### c5

##### Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Oh wow, thanks for all the nice replies!

I've still got one question:

Where can I find more information about hooking to OpenGL/DirectXD3D and how to actually create a dll with a little drawing function inside?

I've heard something about detour functions, is this related to the hooking?
Yes. You need to detour the games D3D drawing function to your function, make changes and apply stuff there, and then return back to the game. Microsoft detours is a library which simplifies the whole process of coding such a detour/hook, so you don't have to worry about the hooking part itself so much

For ESP, it's best to hook endscene (well, that's what is commonly hooked in such cases) because it's called once per frame and does the job well.

Take a look at some public hooks source codes on the web and you'll understand the whole process better

Last edited:

#### Ollie

##### Newbie
Full Member
I'm a real beginner and I don't get all this stuff, sorry.

I set myself a goal, and I want to draw simple rectangle in AssaultCube game.
AssaultCube uses OpenGL (You can't use d3d in opengl games right?), has no anti-hack so there are no worries about injecting.

Is there any source code that has this sort-of a feature and where would I start hooking/detouring some opengl?

Thanks again

#### Ollie

##### Newbie
Full Member
Assault Cube uses OpenGL, and will not work with any D3 hooks.
Yeah I know that but how do I hook OpenGL/draw stuff on the screen?

#### Ollie

##### Newbie
Full Member
Hmm..

Would it be easier to create a D3D hook in some d3d game (example: COD4), instead of OpenGL?
Can i find more tutorials about d3d than ogl in the internet?

I have really no idea where to start and what to do.

Thanks again!

#### Ollie

##### Newbie
Full Member
Yeah I know some about Win32API, but it's pretty difficult to find tutorials that go in depth.
PerfectsDaily's tutorials were awesome, simple but yet effective.

Attention! Before you post:

99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

• Fill out the form correctly
• Tell us the game name & coding language
• Ask specific questions, be descriptive
• Post errors, line numbers & screenshots
• Post code snippets using code tags
• If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.