Page 1 of 8 123 ... LastLast
Results 1 to 15 of 111
  1. #1
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy

    How to display player stats

    Here is how I do mine :

    Code:
    Pointer :
    
    0x377CF260
    
    Classes :
    
    class Main;
    class Info;
    class Stats;
    class WepInfo;
    class Something;
    
    class Main
    {
    public:
    	Info* goToInfoClass; //0000
    };
    
    class Info
    {
    public:
    	char unknown0[8];
    	__int32 Unknown1; //0008
    	__int32 iCurrentHealth; //000C
    	char unknown2[4];
    	__int32 iMaxHealth; //0014
            char unknown3[4];
    	WepInfo* goToWepInfo;//001C
    	Something* goToSomething; //0020
    	char unknown4[348];
    	float fStamina; //0180
    	char unknown5[8];
    	__int32 iWeaponSlotInUse; //018C
    	float fCameraSomething; //0190
    	float fCameraSomething2; //0194
    	float fCameraSomething3; //0198
    	char unknown6[32];
    	Stats* goToStats; //01BC
    };
    
    class WepInfo
    {
    public:
    	__int32 iBackPackABulletsLeft; //0000
    	__int32 i2ndaryBulletsLeft; //0004
    	__int32 Unknown0; //0008
    	__int32 iGrenadesLeft; //000C
    	__int32 iBackPackBBulletsLeft; //0010
    };
    
    class Stats
    {
    public:
    	char unknown0[16];
    	char szLocalNameChangesInKill[16]; //0010
    	char unknown1[12];
    	__int32 iKills; //002C
    	__int32 iDeaths; //0030
    	char unknown2[44];
    	__int32 iHeadShots; //0060
    };
    
    class Something
    {
    public:
    	BYTE bIsAlive; //0000
    };
    How to use :

    Code:
    void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
    
        D3DRECT rec = { x, y, x + w, y + h };
        pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }
    
    void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR 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 DrawHealthbar(int x, int y, int w, int h, D3DCOLOR barCol, D3DCOLOR borCol, int hp, int maxhp)
    {
    
    FillRGB(x, y, ( hp / (double)maxhp ) * w, h, barCol, pDevice);
    DrawBorder(x, y, w, h, borColor, pDevice);
    
    }
    
    DrawHealthbar(15, 15, 125, 15, pMain->gotoInfoClass->iCurrentHealth, pMain->gotoInfoClass->iMaxHealth);
    
    double kills = pMain->gotoInfoClass->gotoStatsClass->iKills, deaths = pMain->gotoStatsClass->gotoStatsClass->iDeaths, kdr;
    char *cKDR;
    
    kdr = kills / deaths;
    
    sprintf(cKDR, "Current KDR : %0.02f", kdr);
    //etc...
    Credits to Gellin for the classes.
    Last edited by J; 08-19-2010 at 12:51 PM.

  2. The Following 13 Users Say Thank You to Crash For This Useful Post:

    CodeDemon (08-19-2010),DeadLinez (08-20-2010),flashlight95 (08-30-2010),gcflames12 (08-19-2010),GodHack2 (08-19-2010),Hahaz (08-30-2010),kotentopf (08-20-2010),markoj (08-19-2010),mastermods (08-25-2010),ppl2pass (08-19-2010),supercarz1991 (08-19-2010),swatfx (08-19-2010),Yepikiyay (08-19-2010)

  3. #2
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    thanks and what makes it best is its not spoonfed

  4. #3
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,070
    Reputation
    50
    Thanks
    940
    My Mood
    Fine
    Nice share Crash! Thanks!

  5. #4
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    Yay ty. the one posted by Blood does not work. It crashed like shit.

  6. #5
    Yepikiyay's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    320
    Reputation
    10
    Thanks
    37
    My Mood
    Drunk
    thanks for this m8

    I Hate You
    Current Status: Online Playing MineCraft

  7. #6
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    bloods works.. u must not know what to do with them if it crashed u

  8. #7
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    659
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    very nice thanks for this

  9. #8
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    nice^^ but can u please explane me how i make that Class Main get the Adress and how i adding the offsets?

    sorry for the N00b Question(if it is one >.<)

  10. #9
    DeadLinez's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    https://mpgh.net Sexy Points: 989,576,420
    Posts
    465
    Reputation
    11
    Thanks
    500
    My Mood
    Psychedelic
    Quote Originally Posted by kotentopf View Post
    nice^^ but can u please explane me how i make that Class Main get the Adress and how i adding the offsets?

    sorry for the N00b Question(if it is one >.<)
    ROFL, btw nice job.

  11. #10
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    dont make fun of him at least hes willing to learn!

  12. #11
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    hmmmm i only have an idea

    f.e.:

    Info::iCurrentHealth = Address + Offset

    DrawText(blabla, "Current HP: %i", Info::iCurrentHealth);

    or how? only a tip >.<

  13. #12
    UltimateX1's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    114
    Reputation
    10
    Thanks
    10
    My Mood
    Yeehaw
    this would be good for people with a working d3d hook

  14. #13
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    I added gellin's local player struct in a .h file and now my menu doesnt even show up.
    I have everything including your draw health in base.cpp fixed w/o errors but I dont see anything show up. Not even my menu. When i remove those, menu is fine.

  15. #14
    Beatz's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    In your head.
    Posts
    2,118
    Reputation
    66
    Thanks
    321
    My Mood
    Stressed
    Thanks for sharing.
    Don't Talk If You Can't Do.


  16. #15
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    hmmmm... is the addy the currently one? or is the addy out of date?

Page 1 of 8 123 ... LastLast

Similar Threads

  1. [Help]Problem with Player Stats?
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 7
    Last Post: 08-26-2010, 05:26 AM
  2. How to add Soldier Stats to Signature
    By SXE BOI in forum CrossFire Tutorials
    Replies: 0
    Last Post: 06-30-2010, 05:59 PM
  3. PLAYER STATS
    By xkostasx7 in forum Call of Duty Modern Warfare 2 Help
    Replies: 5
    Last Post: 02-04-2010, 09:45 AM
  4. [Release] Player Stats Hack | Level 70 HACK |
    By Gravemind1 in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 64
    Last Post: 01-16-2010, 05:30 PM
  5. [Release] Player Stats Hack 2.0 | Level 70 HACK | TIME PLAYED HACK
    By Gravemind1 in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 235
    Last Post: 01-13-2010, 06:07 PM