Results 1 to 10 of 10
  1. #1
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic

    Post External Cross-Hair (C# Code)

    Well, this is the best I have came up with. And the best is that it don't crash
    WARNING: This code is coded for 1900 x 1080 No Border screen.
    So for your own, you need to change the Lines. (Marked with red in code.)
    Remember to add the:
    Code:
    using System.Runtime.InteropServices;
    Code:
    [DllImport("user32.dll", EntryPoint = "FindWindow")]
            public static extern IntPtr FindWindow(string lp1, string lp2);
    
    IntPtr Handle = FindWindow(null, "WhatYouWant");
                try
                {
                    
                    using (Graphics g = Graphics.FromHwnd(Handle))
                    {
                        Pen PN = new Pen(Brushes.Khaki, 2);
                        g.DrawLine(PN, 961, 520, 961, 560);
                        g.DrawLine(PN, 985, 540, 935, 540);
                        g.Dispose();
                    }
                }
                catch (Exception Ex)
                {
                    MessageBox.Show(Ex.Message, "Error Message:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    MessageBox.Show("If you could be so nice to report this on the released site, it would be great.", "Ops:", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    Application.Exit();
                }
    Put it in a timer or add the for( ; ; )

    Enjoy.


    Image: (This is fake. Because the Cross-Hair don't show )
    Last edited by Jorndel; 12-07-2011 at 11:59 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  2. #2
    TeamDarkness's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Right Behind You!
    Posts
    307
    Reputation
    10
    Thanks
    3,371
    May iam stupid , but what exactly does this? Can you make an screenshot ? i have 1680x1050 how to change that? and Finally where to put this in ? config??

  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by TeamDarkness View Post
    May iam stupid , but what exactly does this? Can you make an screenshot ? i have 1680x1050 how to change that? and Finally where to put this in ? config??
    This is for C# Programmers.
    To change screen resolution. (You need to test out..)
    You will need a Programming Program. (Like Visual C# Express.)
    Screen. Taking then

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  4. #4
    FrogBlue's Avatar
    Join Date
    Oct 2011
    Gender
    female
    Posts
    12
    Reputation
    10
    Thanks
    0
    The screenshot, please.
    And if for 1024х768 then what values will be?

  5. #5
    TeamDarkness's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Right Behind You!
    Posts
    307
    Reputation
    10
    Thanks
    3,371
    @ Jorndel thx for the info, but still not what iam looking for ;( i was looking for some changes to make crosshair permanent red in mw3 game . Anyway good job for thoose who knows what to do with

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by TeamDarkness View Post
    @ Jorndel thx for the info, but still not what iam looking for ;( i was looking for some changes to make crosshair permanent red in mw3 game . Anyway good job for thoose who knows what to do with
    To do what you wish:
    Go in the Mw3 Main folder. iw_0
    Find: center_cross.iwi
    and texture edit. (Red might not go. But others )

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. The Following User Says Thank You to Jorndel For This Useful Post:

    TeamDarkness (12-07-2011)

  8. #7
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,317
    My Mood
    Breezy
    You can use GetClientRect to find the the dimensions of the window and do some simple algebra/math to figure out where to put the crosshair.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #8
    Razor19_'s Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    0
    Reputation
    10
    Thanks
    0
    @Jorndel I'm kind of new to coding i know how to make trainers and stuff but not this... i know pre much how to code abit in visual basic C++ but i don't know what project to start or do? please help!

  10. #9
    N1pp@'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    148
    Reputation
    34
    Thanks
    876
    @Jorndel

    Could you not have it automatically set the position? Something like...

    Code:
    ScrW = Get current desktop width
    ScrH = Get current desktop height
    XhairW = Total width of the crosshair
    XhairH = Total height of the crosshair
    TweakW = +1*
    TweakH = +1*
    
    XhairXPosition = (ScrW/2)-(XhairW/2)+TweakW
    XhairYPosition = (ScrH/2)-(XhairH/2)+TweakH
    
    * Because screen dimensions are even there can never be a 'true' centre pixel. 
    Going by Barrat scope MW3 has the centre pixel on a 1920x1080 screen at 961, 541)
    Note: This isn't C++ code! Just a rough explanation...!

  11. #10
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by N1pp@ View Post
    @Jorndel

    Could you not have it automatically set the position? Something like...

    Code:
    ScrW = Get current desktop width
    ScrH = Get current desktop height
    XhairW = Total width of the crosshair
    XhairH = Total height of the crosshair
    TweakW = +1*
    TweakH = +1*
    
    XhairXPosition = (ScrW/2)-(XhairW/2)+TweakW
    XhairYPosition = (ScrH/2)-(XhairH/2)+TweakH
    
    * Because screen dimensions are even there can never be a 'true' centre pixel. 
    Going by Barrat scope MW3 has the centre pixel on a 1920x1080 screen at 961, 541)
    Note: This isn't C++ code! Just a rough explanation...!
    Yes I can.
    And, did you look at the date it was posted?
    12-07-2011
    And this is a bad version anyway :S

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

Similar Threads

  1. [Question]Custom cross hairs.
    By RJ in forum Combat Arms Hacks & Cheats
    Replies: 15
    Last Post: 09-06-2008, 01:17 PM
  2. How to mod your computer for a fixed cross-hair
    By xxBigBuns in forum Combat Arms Hacks & Cheats
    Replies: 17
    Last Post: 08-25-2008, 05:52 PM
  3. cross hair program tut
    By GG2GG in forum Programming Tutorial Requests
    Replies: 4
    Last Post: 03-05-2008, 02:20 PM
  4. Make Your own Cross hairs
    By llvengancell in forum WarRock - International Hacks
    Replies: 6
    Last Post: 05-28-2007, 01:12 AM
  5. Make your own Warrock Cross hairs!!
    By llvengancell in forum WarRock - International Hacks
    Replies: 3
    Last Post: 05-26-2007, 11:59 PM