Page 3 of 13 FirstFirst 12345 ... LastLast
Results 31 to 45 of 189
  1. #31
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    hmm i crash when trying to use the DrawBox Function any ideas? D3D is not my strength

  2. #32
    Synns's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    5,174
    Reputation
    170
    Thanks
    2,557
    My Mood
    Bitchy
    Quote Originally Posted by pr0h4x0r View Post
    Fro universal FPS counter help me out with this error
    :
    1>.\Base.cpp(24) : error C3861: 'clock': identifier not found
    #include <time.h>

    Quote Originally Posted by swatfx View Post
    hmm i crash when trying to use the DrawBox Function any ideas? D3D is not my strength
    We can't help you without seeing your code.

  3. #33
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    How would I delete an already created font?
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  4. #34
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Code:
    void cDirectx::FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice ) 
    { 
        if( w < 0 )w = 1; 
        if( h < 0 )h = 1; 
        if( x < 0 )x = 1; 
        if( y < 0 )y = 1; 
    
        D3DRECT rec = { x, y, x + w, y + h }; 
        pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 ); 
    } 
    
    void cDirectx::DrawBorder( int x, int y, int w, int h, int px, DWORD BorderColor, IDirect3DDevice9* pDevice ) 
    { 
        FillRGB( x, (y + h - px), w, px,    BorderColor, pDevice ); 
        FillRGB( x, y, px, h,                BorderColor, pDevice ); 
        FillRGB( x, y, w, px,                BorderColor, pDevice ); 
        FillRGB( (x + w - px), y, px, h,    BorderColor, pDevice ); 
    } 
    
    void cDirectx::DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice ) 
    { 
        FillRGB( x, y, w, h,        BoxColor, pDevice ); 
        DrawBorder( x, y, w, h, 1,    BorderColor, pDevice ); 
    }
    put that in Globals under DirectX.cpp

    Code:
    			LPD3DXFONT pFont;
    			LPDIRECT3DDEVICE9 pDevice;
    			void Hook(void);
    			void DrawTri(LPDIRECT3DDEVICE9 dev, int x, int y, int w, int h, DWORD Color);
    			void DrawString( int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...);
    			void FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice );
    			void DrawBorder( int x, int y, int w, int h, int px, DWORD BorderColor, IDirect3DDevice9* pDevice );
    			void DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice );
    			
    			HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32);
    thats basically all the code from the cDirectX class under DirectX.h

    Code:
    Directx.DrawBox((this->mSet.x),(this->mSet.y),50,100,0xFFBF3EFF,0xFFFF6103,Directx.pDevice);
    put that under RenderMenu in Menu.cpp to appear if the menu hotkey is pressed

    the numbers for the DrawBox position are basically random since the box never actually appeared CA just crashed

  5. #35
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by swatfx View Post
    Code:
    void cDirectx::FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice ) 
    { 
        if( w < 0 )w = 1; 
        if( h < 0 )h = 1; 
        if( x < 0 )x = 1; 
        if( y < 0 )y = 1; 
    
        D3DRECT rec = { x, y, x + w, y + h }; 
        pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 ); 
    } 
    
    void cDirectx::DrawBorder( int x, int y, int w, int h, int px, DWORD BorderColor, IDirect3DDevice9* pDevice ) 
    { 
        FillRGB( x, (y + h - px), w, px,    BorderColor, pDevice ); 
        FillRGB( x, y, px, h,                BorderColor, pDevice ); 
        FillRGB( x, y, w, px,                BorderColor, pDevice ); 
        FillRGB( (x + w - px), y, px, h,    BorderColor, pDevice ); 
    } 
    
    void cDirectx::DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice ) 
    { 
        FillRGB( x, y, w, h,        BoxColor, pDevice ); 
        DrawBorder( x, y, w, h, 1,    BorderColor, pDevice ); 
    }
    put that in Globals under DirectX.cpp

    Code:
    			LPD3DXFONT pFont;
    			LPDIRECT3DDEVICE9 pDevice;
    			void Hook(void);
    			void DrawTri(LPDIRECT3DDEVICE9 dev, int x, int y, int w, int h, DWORD Color);
    			void DrawString( int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...);
    			void FillRGB( int x, int y, int w, int h, DWORD color, IDirect3DDevice9* pDevice );
    			void DrawBorder( int x, int y, int w, int h, int px, DWORD BorderColor, IDirect3DDevice9* pDevice );
    			void DrawBox( int x, int y, int w, int h, DWORD BoxColor, DWORD BorderColor, IDirect3DDevice9* pDevice );
    			
    			HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32);
    thats basically all the code from the cDirectX class under DirectX.h

    Code:
    Directx.DrawBox((this->mSet.x),(this->mSet.y),50,100,0xFFBF3EFF,0xFFFF6103,Directx.pDevice);
    put that under RenderMenu in Menu.cpp to appear if the menu hotkey is pressed

    the numbers for the DrawBox position are basically random since the box never actually appeared CA just crashed
    Put in your own X & Y corrds.
    I think thats the reason.

    Also, Are you creating it in Present? (Gellins base Yes?)

  6. #36
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by whatup777 View Post
    How would I delete an already created font?
    LOL.../...if you was ment to be a coder you will kno how to Delete the Font... If it was something else i will understand but Deleting it... COME ON
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  7. #37
    BishPop's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Is this for C++?
    I don't get it.
    Could someone provide a tutorial?

  8. #38
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by BishPop View Post
    Is this for C++?
    I don't get it.
    Could someone provide a tutorial?
    lololool.
    This doesnt need a tutoriual.
    Its very straight forward.

    I suggest you learn some C++ & D3D so you understand all this.

  9. #39
    Mr.Magicman's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Sitting in my cave full of thoughts learning Asembly
    Posts
    2,102
    Reputation
    16
    Thanks
    649
    My Mood
    Cold
    Acid you just broke the rules.... (unwritten rules)

  10. #40
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Quote Originally Posted by topblast View Post


    LOL.../...if you was ment to be a coder you will kno how to Delete the Font... If it was something else i will understand but Deleting it... COME ON
    LOL ...if you knew anything you would know I must start somewhere.
    Now stop flaming like a noob. You dont know everything so stop trying to make yourself feel better by flaming and take your insecure face somewhere else./
    Last edited by whatup777; 06-23-2010 at 07:19 AM.
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  11. #41
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Quote Originally Posted by whatup777 View Post
    LOL ...if you knew anything you would know I must start somewhere.
    Now stop flaming like a noob. You dont know everything so stop trying to make yourself feel better by flaming and take your insecure face somewhere else./
    lol he is gonna flame u more =\ and just a hint don't recommend any grammar books for him either

    but anyway getting back on topic...

    i forgot to even create the box /Facepalm
    but i'm still having troubles
    Code:
    D3DXCreateBox()
    I assume i have to use that to create it but I have no idea what to put for the mesh or the D3DXBUFFER. I have tried this
    Code:
    ID3DXMesh *mesh = NULL;
    D3DXCreateBox(pDevice, 50, 100, 0, &mesh, NULL);
    I fear this is beyond my understanding of D3D since I just can't get it to stop crashing. Any hints?

  12. #42
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    The crosshair give me a crap load of errors like redefining and stuff so I'll just make my own, But the circle is what intrests me how did you find the center of screen :P
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  13. #43
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    Quote Originally Posted by whatup777 View Post
    The crosshair give me a crap load of errors like redefining and stuff so I'll just make my own, But the circle is what intrests me how did you find the center of screen :P
    using SetViewPort

  14. The Following User Says Thank You to swatfx For This Useful Post:

    ac1d_buRn (06-24-2010)

  15. #44
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by whatup777 View Post
    The crosshair give me a crap load of errors like redefining and stuff so I'll just make my own, But the circle is what intrests me how did you find the center of screen :P
    Same way i did the crosshair.

  16. #45
    /b/oss's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    13,651
    Reputation
    795
    Thanks
    3,547
    lol nice gj

Page 3 of 13 FirstFirst 12345 ... LastLast

Similar Threads

  1. [Release] Class library with some useful functions.
    By t7ancients in forum C# Programming
    Replies: 8
    Last Post: 05-17-2011, 04:41 AM
  2. Useful Functions
    By Iamazn1 in forum Visual Basic Programming
    Replies: 6
    Last Post: 01-15-2011, 12:14 AM
  3. [Release] DrawCheckBox Function
    By DeadLinez in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 17
    Last Post: 09-10-2010, 04:49 AM
  4. [Discussion] Ideas for my next launcher release, look, functions & more
    By teun95 in forum CrossFire Hacks & Cheats
    Replies: 17
    Last Post: 03-02-2010, 04:38 PM
  5. [Release] USE OPK FOR COMBAT ARMS NO DOWNLOAD UNPATCHABLE AND UNDETECTABLE!!!
    By wetrichard in forum Combat Arms Hacks & Cheats
    Replies: 114
    Last Post: 05-24-2009, 09:40 AM