Thumbs upReading Weapon Names

Posts 14 of 4 · Page 1 of 1
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
Quote Originally Posted by Mayion View Post
@ @DadDelta PHP Code?!
yeah sorry, removed it.
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.
Posts 14 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?