Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

Need Help! Code a crosshair for games

I want to make a crosshair, or a small dot in the middle of the screen so it would act like a crosshair.. Im playing this game called Rust, and the bow doesnt have crosshair, so I'd like to make one.
I dont want to inject the crosshair to the game, but instead I want it to be like a image or something that is always on top.
And ofc, it would be made in C++
Im not very advanced in C++ so please explain easily :D

Thanks in advance
You have 3 options:
- Inject a D3D hook and draw the crosshair;
- Use GDI or a DirectX Overlay and draw it (will require windowed mode);
- Stick something on the center of the screen.
(Mar 5, 2014 05:27 AM)blumerc Wrote:  You have 3 options:
- Inject a D3D hook and draw the crosshair;
- Use GDI or a DirectX Overlay and draw it (will require windowed mode);
- Stick something on the center of the screen.

OP, if the game has an anticheat, first option may not be the best.
Anticheats usually look for injections, even if it's nothing harmful.
(Mar 5, 2014 05:27 AM)blumerc Wrote:  You have 3 options:
- Inject a D3D hook and draw the crosshair;
- Use GDI or a DirectX Overlay and draw it (will require windowed mode);
- Stick something on the center of the screen.

Vouch for option 3. I'm now a cevo pro.
This is definitely a more expensive option but this: http://www.newegg.com/Product/Product.as...6824236313 has a built in crosshair you can add on to anygame but as for the cheaper options i would just go with RUii options lol
New car pics coming soon!

(Formerly known as Audi)
(Mar 5, 2014 05:27 AM)blumerc Wrote:  You have 3 options:
- Inject a D3D hook and draw the crosshair;
- Use GDI or a DirectX Overlay and draw it (will require windowed mode);
- Stick something on the center of the screen.

Does option 2 work if I play on windowed with noborders? I think the launch options on steam for that are "-windowed -noborder" if that helps to understand what I mean :P

Option 3 would be the easiest :D but I like to code it because having a piece of tape on my screen feels too cheap :P
(Mar 5, 2014 06:46 AM)zooppa Wrote:  Does option 2 work if I play on windowed with noborders? I think the launch options on steam for that are "-windowed -noborder" if that helps to understand what I mean :P

Option 3 would be the easiest :D but I like to code it because having a piece of tape on my screen feels too cheap :P

Yes, works with windowed + noborder, you can even make it fit your entire screen. The reason why it must be in windowed mode is because you will need to get the game's window Handle.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by RandomUser123Apr 19, 2015 11:11 AM 1 98 Apr 19, 2015 11:11 AM
Last Post: Only3
[.NET] by BerryPDec 22, 2014 03:56 PM 8 350 Dec 22, 2014 03:56 PM
Last Post: BerryP
[C#] by the best guy everMay 10, 2014 04:43 PM 36 773 May 10, 2014 04:43 PM
Last Post: 0xDEAD10CC