Introducing MPGH's AIGA. The latest advancement in artificial intelligence. Click here now to learn more!
Results 1 to 9 of 9
  1. #1
    ChanceOfHax's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    PlayerInfo* pPlayer = SearchPlayerByIndex(ChanceOfHax);
    Posts
    113
    Reputation
    3
    Thanks
    5
    My Mood
    Sneaky

    Question [HELP] How to use classes?

    Ok i have a problem.... I want to know how to use classes like


    [PHP]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
    };[/PHP]

    I have seen something like this:

    [PHP]int cHealth = pMain->gotoInfoClass->iCurrentHealth;[/PHP]

    But how to declaire the pMain? Cause the pMain is the once error

    Plz Help meh

  2. #2
    DreadKyller's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    122
    Reputation
    12
    Thanks
    21
    you do not have pMain, instead of pMain replace it with YOUR class.

    Code:
    int cHealth = Info->iCurrentHealth
    I not know too much about classes, but I think that how it's done.

    Why do you have the:

  3. #3
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    /if u use with a clas the "->" its a pointer, so u must make that the class is a pointer for the address

    like
    [php]class test
    {
    int a;
    char b;
    };

    test MainClass;//No Pointer

    MainClass.a = 2;

    //---------------------

    test *TheClass;//Pointer
    TheClass->b = "a pointer class";[/php]

    the rest is define an address(DWORD) with the class like an int or an char
    just use ur C++ skillz, if u have one
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  4. #4
    ChanceOfHax's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    PlayerInfo* pPlayer = SearchPlayerByIndex(ChanceOfHax);
    Posts
    113
    Reputation
    3
    Thanks
    5
    My Mood
    Sneaky
    Ok that works now but the game shut down when i make it so:

    [php]Main * pMain;

    int cHealth = pMain->goToInfoClass->iCurrentHealth;[/php]

    And when i make it so:

    [php]Main * pMain = *(DWORD*) 0x377C8538;

    int cHealth = pMain->goToInfoClass->iCurrentHealth;[/php]

    My copiler say he cant compile it to DWORD ?!??!?!?! Plz help me

    Übrigens bin ich deutsch xD

  5. #5
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by ChanceOfHax View Post
    Ok that works now but the game shut down when i make it so:

    [php]Main * pMain;

    int cHealth = pMain->goToInfoClass->iCurrentHealth;[/php]

    And when i make it so:

    [php]Main * pMain = *(DWORD*) 0x377C8538;

    int cHealth = pMain->goToInfoClass->iCurrentHealth;[/php]

    My copiler say he cant compile it to DWORD ?!??!?!?! Plz help me

    Übrigens bin ich deutsch xD
    ja wenn du pMain eine addresse zuweist sieht das ungefähr so aus

    aber du sollst nich den ausgelesen DWORD benutzen sondern die fertige addresse

    [php]Local *pLocal = (Local*) Hack.Addresses.LPP;
    ------------------^du weist der address folgendem pointer zu[/php]
    so würde es aussehen (copy and paste)

    falls du aber eine addresse via #define definiert sollte es so aussehen

    [php]Main *pMain = (Main*) *(DWORD*) ADDY;
    //bin mir nich 100% sicher muss ich zugeben xD[/php]

    English:
    he have a problem he understand my language(german) if u want to read it, please use google ^^
    Last edited by kotentopf; 10-26-2010 at 06:11 AM.
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  6. #6
    ChanceOfHax's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    PlayerInfo* pPlayer = SearchPlayerByIndex(ChanceOfHax);
    Posts
    113
    Reputation
    3
    Thanks
    5
    My Mood
    Sneaky
    Also das 2. klappt net probier jetzt das 1.

    Das 1. klappt aber das game kackt die ganze Zeit ab warum?!

  7. #7
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by ChanceOfHax View Post
    Also das 2. klappt net probier jetzt das 1.

    Das 1. klappt aber das game kackt die ganze Zeit ab warum?!
    funzt nur wenn du es ingame verwendest, wie du das anstellst ist dir überlassen
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

  8. #8
    T0y's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    92
    Reputation
    10
    Thanks
    25
    you class info is old, get new one.

  9. #9
    ChanceOfHax's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    PlayerInfo* pPlayer = SearchPlayerByIndex(ChanceOfHax);
    Posts
    113
    Reputation
    3
    Thanks
    5
    My Mood
    Sneaky
    Das Game kackt trotzdem noch ab kanns sein das de rpointer nur bei na geht?

    Kotentopf hast du eig Skype?

Similar Threads

  1. [HELP] How to use classes?
    By ChanceOfHax in forum Combat Arms EU Hack Coding/Source Code
    Replies: 7
    Last Post: 10-26-2010, 10:47 AM
  2. [Help]How to use Topblast d3d test environment?
    By NOOBJr in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 09-19-2010, 08:04 AM
  3. [Help]How to use "Next"
    By Matrix10 in forum Visual Basic Programming
    Replies: 9
    Last Post: 03-10-2010, 04:10 PM
  4. (i need help) how to use dev-c++
    By u1111u in forum C++/C Programming
    Replies: 6
    Last Post: 03-29-2009, 05:10 PM
  5. Help! how to use ardamax keylogg
    By gmgundamx7 in forum WarRock - International Hacks
    Replies: 8
    Last Post: 02-28-2007, 04:43 PM