Thread: crosshair

Results 1 to 5 of 5
  1. #1
    maaaaaad3's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    106
    Reputation
    10
    Thanks
    4

    Post crosshair

    how to make a crosshair?

  2. #2
    xCyberxx's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    C:\Windows\sys32
    Posts
    1,417
    Reputation
    379
    Thanks
    1,459
    My Mood
    Devilish
    You'll need a C++ directx9 hook (DLL) and some C++ knowledge.

    Then u need to make a function to draw the crosshair
    Code:
    void Crosshair(LPDIRECT3DDEVICE9 pDevice, D3DCOLOR color)
    {
        D3DVIEWPORT9 viewP;
        pDevice->GetViewport( &viewP );
        DWORD ScreenCenterX = viewP.Width / 2;
        DWORD ScreenCenterY = viewP.Height / 2;                      
        D3DRECT rect1 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+5,  ScreenCenterY+1};
        D3DRECT rect2 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+1,  ScreenCenterY+5};
        pDevice->Clear( 1, &rect1, D3DCLEAR_TARGET, color, 0,  0 );
        pDevice->Clear( 1, &rect2, D3DCLEAR_TARGET, color, 0,  0 );
    }
    and in the endscene u need to call the function with the pDevice argument and a color
    Colors can be in ARGB and can be defined by using the D3DCOLOR_ARGB(); function.

    Code:
    #define RED                D3DCOLOR_ARGB(255, 255, 000, 000) // Define the color RED in Direct
    
    Crosshair(pDevice, RED); // Call the CrossHair with the color RED
    Quote Originally Posted by darkwrath505 View Post

    "zomg ples m4ke free hacks, im too lazy t0 get source code and update offsets." - MPGH 2015



  3. The Following 2 Users Say Thank You to xCyberxx For This Useful Post:

    desertions (07-20-2014),maaaaaad3 (07-20-2014)

  4. #3
    maaaaaad3's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    106
    Reputation
    10
    Thanks
    4
    thank you!

  5. #4
    maaaaaad3's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    106
    Reputation
    10
    Thanks
    4
    Quote Originally Posted by xCyberxx View Post
    You'll need a C++ directx9 hook (DLL) and some C++ knowledge.

    Then u need to make a function to draw the crosshair
    Code:
    void Crosshair(LPDIRECT3DDEVICE9 pDevice, D3DCOLOR color)
    {
        D3DVIEWPORT9 viewP;
        pDevice->GetViewport( &viewP );
        DWORD ScreenCenterX = viewP.Width / 2;
        DWORD ScreenCenterY = viewP.Height / 2;                      
        D3DRECT rect1 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+5,  ScreenCenterY+1};
        D3DRECT rect2 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+1,  ScreenCenterY+5};
        pDevice->Clear( 1, &rect1, D3DCLEAR_TARGET, color, 0,  0 );
        pDevice->Clear( 1, &rect2, D3DCLEAR_TARGET, color, 0,  0 );
    }
    and in the endscene u need to call the function with the pDevice argument and a color
    Colors can be in ARGB and can be defined by using the D3DCOLOR_ARGB(); function.

    Code:
    #define RED                D3DCOLOR_ARGB(255, 255, 000, 000) // Define the color RED in Direct
    
    Crosshair(pDevice, RED); // Call the CrossHair with the color RED
    could you write a tutorial?
    both the Assembly-CSharp.dll

  6. #5
    xCyberxx's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    C:\Windows\sys32
    Posts
    1,417
    Reputation
    379
    Thanks
    1,459
    My Mood
    Devilish
    Quote Originally Posted by maaaaaad3 View Post
    could you write a tutorial?
    both the Assembly-CSharp.dll
    This isn't Assembly-CSharp.dll Editing. This C++ Programming. I'm not planning on making a tutorial for this since there are already enough and people need to learn C++ before they actually understand any of this. Otherwise we just get an Copy Paste section and I don't want this to become a Copy-Paste Section.
    Quote Originally Posted by darkwrath505 View Post

    "zomg ples m4ke free hacks, im too lazy t0 get source code and update offsets." - MPGH 2015



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

    maaaaaad3 (07-20-2014)