Solved How to start with DirectX

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

r4z0r

Coder
Meme Tier VIP
Jul 21, 2016
246
1,678
13
Well, I've been coding some stuff over this year and now that I have enough time to dedicate more to trainer's development I want more. I'm looking for to create a simple ESP for a game that uses DX9 and ofc I searched on google and here for more information but I really don't know how to start, you know? Like most stuff here are source code (which is great) but I don't even know how the basics of directx so I'm confused :x

PS: I tried using the directxtutorial.com but all the source codes of drawing with DX9 it's rly different than what I learned there... Okay I know it's the same thing written in another way but I wonder if exists something more focused, like you only need this to draw simple lines and boxes and that's all.
 

Icew0lf

Software Ninjaneer
Dank Tier VIP
Fleep Tier Donator
Aug 20, 2013
603
17,558
43
watch the sourcecode from fleeps Call of Duty 4 Multihack, its pretty straight forward
https://guidedhacking.com/showthrea...l-of-Duty-4-Modern-Warfare-ESP-AIMBOT-DirectX

what i suggest you to do is the following:
grab cheatengine and the sourcecode and lookup things. if you see in the code fleep is looping through the entitylist, lookup this address in CE and SEE what is actually happening, what he is reading and how...same with the playerstruct. I did this and it helped me a lot.

when you understand how he accesses the entitybase in COD4 (which is totally different to find then assaultcube) you will understand how he draws the ESP hopefully.

edit:
or try to improve your trainers and go internal - code a D3D menu. you dont have to do it urself - there are plenty of sources. but it gives you a better understanding how directx draws
 
Last edited:

r4z0r

Coder
Meme Tier VIP
Jul 21, 2016
246
1,678
13
I started reading his code and I was able to understand a lot, but there are some things I need some help :p´

1- Okay, in the main function he only hooks the Direct3DCreate9, but where's the main loop?
2- If the hook is the main loop(like the game reaches that part and runs his code) where the draw function are called, I wasn't able to understand this at all
 

GAFO666

Hacker
Meme Tier VIP
Aug 19, 2012
520
3,188
23
hm ? main loop ?
all you want is hooking e.g. the endscene for dx9 and that gets called by a dx9-game over and over again.. - and esp will be drawn inside that function..
 

r4z0r

Coder
Meme Tier VIP
Jul 21, 2016
246
1,678
13
Ok, that's the part I didn't understand, let me show you what I think I know it's happening.

1- When the DLL attaches to the process it'll hook the Direct3DCread9.
Img1

2- Now I assume when the game calls the function my code will run. I just can't figure out which part of the code it will execute first. I'm assuming that he'll call this one 'cause the function name is a parameter when hooking. Or this is called just once?
Not sure about this one

3- Now if I'm right about the second topic it'll run that code, right? I just can't find where Fleep's code starts drawing the things, I haven't seen a function calling those instructions. If you can help me with this I'd be very thankful.
 
Attention! Before you post:

Read the How to Ask Questions Guide
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
  • Post everything we need to know to help you
  • 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.

Community Mods