Results 1 to 9 of 9
  1. #1
    sam22's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Behind u
    Posts
    773
    Reputation
    33
    Thanks
    879
    My Mood
    Amazed

    How to make a sexy Rainbow Crosshair For

    ok here is how to make a rainbow crosshair Which looks like this I have uploaed the hole project so you can see ur self



    ok First add this at the top of your source

    Code:
    bool crosshair = true; 
      float ScreenCenterX = 0.0f;//Horizontal Position 
      float ScreenCenterY = 0.0f;//Vertical Position
    we say "bool crosshair = true;" this will make the crosshiar auto on so u will see as soon as you go in ava
    go to your SetViewport <-- press ctrl f and type this to find
    and add this

    Code:
      ScreenCenterX = ( float )pViewport->Width / 2;
              ScreenCenterY = ( float )pViewport->Height / 2;
    than we go to our EndScene
    Code:
    if(crosshair)
        {
           D3DRECT rec4 = {ScreenCenterX-35, ScreenCenterY, ScreenCenterX+ 35, ScreenCenterY+1};
        D3DRECT rec5 = {ScreenCenterX, ScreenCenterY-35, ScreenCenterX+ 1,ScreenCenterY+35};  
        m_pD3Ddev->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 );//purple
        m_pD3Ddev->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(0.62745098, 0.125490, 0.959999, 1.0), 0,  0 ); 
    
        D3DRECT rec6 = {ScreenCenterX-30, ScreenCenterY, ScreenCenterX+ 30, ScreenCenterY+1};
        D3DRECT rec7 = {ScreenCenterX, ScreenCenterY-30, ScreenCenterX+ 1,ScreenCenterY+30};  
        m_pD3Ddev->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 );//blue
        m_pD3Ddev->Clear( 1, &rec7, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 1.0, 1.0), 0,  0 ); 
    
        D3DRECT rec8 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1};
        D3DRECT rec9 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25};  
        m_pD3Ddev->Clear( 1, &rec8, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );//cyan
        m_pD3Ddev->Clear( 1, &rec9, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 1.0, 1.0), 0,  0 );
    
        D3DRECT rec10 = {ScreenCenterX-20, ScreenCenterY, ScreenCenterX+ 20, ScreenCenterY+1};
        D3DRECT rec11 = {ScreenCenterX, ScreenCenterY-20, ScreenCenterX+ 1,ScreenCenterY+20};  
        m_pD3Ddev->Clear( 1, &rec10, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );// green
        m_pD3Ddev->Clear( 1, &rec11, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 1.0, 0.0, 1.0), 0,  0 );
    
        D3DRECT rec12 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1};
        D3DRECT rec13 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15};  
        m_pD3Ddev->Clear( 1, &rec12, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );// yellow
        m_pD3Ddev->Clear( 1, &rec13, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 1.0, 0.0, 1.0), 0,  0 );
        
        D3DRECT rec14 = {ScreenCenterX-10, ScreenCenterY, ScreenCenterX+ 10, ScreenCenterY+1};
        D3DRECT rec15 = {ScreenCenterX, ScreenCenterY-10, ScreenCenterX+ 1,ScreenCenterY+10};  
        m_pD3Ddev->Clear( 1, &rec14, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );// orange
        m_pD3Ddev->Clear( 1, &rec15, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.549019608, 0.0, 1.0), 0,  0 );
    
        D3DRECT rec16 = {ScreenCenterX-5, ScreenCenterY, ScreenCenterX+ 5, ScreenCenterY+1};
        D3DRECT rec17 = {ScreenCenterX, ScreenCenterY-5, ScreenCenterX+ 1,ScreenCenterY+5};  
        m_pD3Ddev->Clear( 1, &rec16, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
        m_pD3Ddev->Clear( 1, &rec17, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );
        }
    as you can see the d3d rec it gose from 4,5 to 6,7 that is the size of our crosshair each line it make it bigger
    enjoy
    and I want to teach some beginners so rply here I u want to learn.
    press thanks

    and mth leave this here because more people look into this section than the tut plz.
    I will upload the project in 5 min enjoy

  2. #2
    Toshie's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    In a dark place
    Posts
    6,286
    Reputation
    48
    Thanks
    391
    Just post it in TUT Section.
    /request move

  3. #3
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,652
    Reputation
    795
    Thanks
    3,543
    ill move when get comp

  4. #4
    Julma Henri's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,533
    Reputation
    205
    Thanks
    773
    My Mood
    In Love
    What program u use ?
    Help me get donator.



    Want to become part of Editor Force? Click the tag below and apply now !

  5. #5
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,652
    Reputation
    795
    Thanks
    3,543
    C++ ...

  6. #6
    Julma Henri's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,533
    Reputation
    205
    Thanks
    773
    My Mood
    In Love
    Quote Originally Posted by m_t_h View Post
    C++ ...
    oh ty ..
    Never used it
    Help me get donator.



    Want to become part of Editor Force? Click the tag below and apply now !

  7. #7
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,652
    Reputation
    795
    Thanks
    3,543
    Quote Originally Posted by iSuckX View Post


    oh ty ..
    Never used it
    its the only way to create ded hack

  8. #8
    sam22's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Behind u
    Posts
    773
    Reputation
    33
    Thanks
    879
    My Mood
    Amazed
    Quote Originally Posted by iSuckX View Post


    oh ty ..
    Never used it
    Microsoft Express Downloads - Visual Studio Express and SQL Server Express here you go download the express vs

  9. #9
    Julma Henri's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,533
    Reputation
    205
    Thanks
    773
    My Mood
    In Love
    Quote Originally Posted by sam22 View Post
    Ty
    Help me get donator.



    Want to become part of Editor Force? Click the tag below and apply now !