Results 1 to 4 of 4
  1. #1
    DadDelta's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    702
    Reputation
    18
    Thanks
    2,263

    Thumbs up Reading Weapon Names



    Code:
            ClientSoldierWeaponsComponent* pCSWC = soldier->m_soldierWeaponsComponent;
                    if (IsValidPtr(pCSWC))
                    {
                        ClientSoldierWeaponsComponent::ClientActiveWeaponHandler* pCAWH = pCSWC->m_activeHandler;
                        if (IsValidPtr(pCAWH))
                        {
                            ClientSoldierWeapon* pCSW = pCAWH->m_activeWeapon;
                            if (IsValidPtr(pCSW))
                            {
                                WeaponEntityData* pWED = pCSW->m_data;
                                if (IsValidPtr(pWED))
                                {
                                    pDrawing->DrawString(x, y, color, false, "[%s]", pWED->m_name.str);
                                }
                            }
                        }
                    }
    Needed Class

    Code:
    class  ClientSoldierWeaponsComponent
    {
    public:
        class ClientAnimatedSoldierWeaponHandler
        {
        public:
            ClientSoldierWeapon* m_WeaponList[7]; //0x0000
        };
    
        enum WeaponSlot
        {
            M_PRIMARY = 0,
            M_SECONDARY = 1,
            M_GADGET = 2,
            M_GADGET2 = 5,
            M_GRENADE = 6,
            M_KNIFE = 7
        };
    
        class ClientActiveWeaponHandler
        {
        public:
            char _0x00[0x38];
            ClientSoldierWeapon* m_activeWeapon; //0x038
        };
    
    
        char _0x0000[16];
        __int64 m_pSoldierWeaponsComponentData; //0x0010 SoldierWeaponsComponentData*
        char _0x0018[8];
        __int64 m_pClientPlayerEntryComponent; //0x0020 ClientPlayerEntryComponent*
        char _0x0028[168];
        D3DXMATRIX m_weaponTransform; //0x00D0 
        char _0x0110[1760];
        ClientAnimatedSoldierWeaponHandler* m_handler; //0x07F0 
        char _0x07F8[32];
        ClientAntAnimatableComponent* m_animatableComponent[2]; //0x0818
        ClientSoldierEntity* m_soldier; //0x0828 ClientSoldierEntity 
        ClientActiveWeaponHandler* m_activeHandler; //0x830
        char _0x0838[192];
        __int64 m_pClientAimingConstraintsEntity; //0x08F8 ClientAimingConstraintsEntity* 
        char _0x0900[248];
        __int32 m_activeSlot; //0x09F8 
        __int32 m_lastActiveSlot; //0x09FC 
        __int32 m_lastActiveWeaponSlot; //0x0A00 
        char _0x0A04[28];
        __int32 m_currentZoomLevel; //0x0A20 
        __int32 m_zoomLevelMax; //0x0A24 
        __int32 m_zeroingDistanceLevel; //0x0A28 
        BYTE m_noMagnifierAccessory; //0x0A2C 
        char _0x0A2D[779];
        float m_timeSinceLastShot; //0x0D38 
    
        ClientSoldierWeapon* GetActiveSoldierWeapon()
        {
            if (!IsValidPtr(m_handler))
                return NULL;
    
                if (m_activeSlot == 0 || m_activeSlot == 1)
            return m_handler->m_WeaponList[m_activeSlot];
                else
                    return NULL;
        };
        int GetSlot()
        {
            return m_activeSlot;
            //0 or 1 is primary or secondary
        }
    };
    
    
    class ClientSoldierWeapon
    {
    public:
        char _0x0000[48];
        WeaponEntityData* m_data; //0x0030 
        char _0x0038[18768];
        ClientSoldierAimingSimulation* m_authorativeAiming;    //0x4988 
        char _0x4990[24];
        ClientWeapon* m_pWeapon;                            //0x49A8  
        char pad_0x49B0[16];                                //0x49B0 
        WeaponFiring* m_pPrimary;                            //0x49C0 
    };
    
    class WeaponEntityData
    {
    public:
        
        class PCHAR
        {
        public:
            char * str;    //0x0 
        };
    
        char _0x0000[0x130];
        PCHAR m_name; //0x0130  
    };
    Credits to SmallC
    Last edited by DadDelta; 08-28-2014 at 03:57 AM.

  2. #2
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    @ @DadDelta PHP Code?!
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  3. #3
    DadDelta's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    702
    Reputation
    18
    Thanks
    2,263
    Quote Originally Posted by Horror Jr View Post
    @ @DadDelta PHP Code?!
    yeah sorry, removed it.

  4. #4
    smallC's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    49
    Reputation
    10
    Thanks
    1,361
    Quote Originally Posted by DadDelta View Post
    Code:
    ClientSoldierWeaponsComponent* pCSWC = soldier->m_soldierWeaponsComponent;
    if (IsValidPtr(pCSWC))
    {
    ClientSoldierWeaponsComponent::ClientActiveWeaponH andler* pCAWH = pCSWC->m_activeHandler;
    if (IsValidPtr(pCAWH))
    {
    ClientSoldierWeapon* pCSW = pCAWH->m_activeWeapon;
    if (IsValidPtr(pCSW))
    {
    WeaponEntityData* pWED = pCSW->m_data;
    if (IsValidPtr(pWED))
    {
    pDrawing->DrawString(x, y, color, false, "[%s]", pWED->m_name.str);
    }
    }
    }
    }
    Needed Class
    Yeah that's my code x)

    But i doubt there is so much coder.

Similar Threads

  1. [Info] Red Weapons Names , Kills [INFO]
    By [Cold]TakerISBANNED in forum WarRock Discussions
    Replies: 13
    Last Post: 12-21-2010, 07:53 AM
  2. i set g_hardcore 1 but i want to add to the weapons names
    By idiot2010 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 12-01-2010, 06:04 AM
  3. Change weapons name above ammo???
    By jul920 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 10-29-2010, 06:12 PM
  4. [Request]Edit weapons names.PLEASE HELP ME!
    By kafezim in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 01-09-2010, 07:44 PM
  5. [Request]Edit weapons names.PLEASE HELP ME!
    By kafezim in forum Combat Arms Mod Discussion
    Replies: 2
    Last Post: 01-09-2010, 06:39 PM