Вопрос "использование имени типа не допускается"

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
Пользователь
Статус
Оффлайн
Регистрация
10 Июн 2017
Сообщения
677
Реакции[?]
117
Поинты[?]
0
C++:
auto g_ChatElement = FindHudElement<C_BasePlayer::C_BaseHudChat>("CHudChat");
C++:
class C_BasePlayer : public C_BaseEntity
{
public:
    static __forceinline C_BasePlayer* GetPlayerByUserId(int id)
    {
        return static_cast<C_BasePlayer*>(GetEntityByIndex(g_EngineClient->GetPlayerForUserID(id)));
    }
    static __forceinline C_BasePlayer* GetPlayerByIndex(int i)
    {
        return static_cast<C_BasePlayer*>(GetEntityByIndex(i));
    }

    NETVAR(bool, m_bHasDefuser, "DT_CSPlayer", "m_bHasDefuser");
    NETVAR(bool, m_bGunGameImmunity, "DT_CSPlayer", "m_bGunGameImmunity");
    NETVAR(int32_t, m_iShotsFired, "DT_CSPlayer", "m_iShotsFired");
    NETVAR(QAngle, m_angEyeAngles, "DT_CSPlayer", "m_angEyeAngles[0]");
    NETVAR(int, m_ArmorValue, "DT_CSPlayer", "m_ArmorValue");
    NETVAR(bool, m_bHasHeavyArmor, "DT_CSPlayer", "m_bHasHeavyArmor");
    NETVAR(bool, m_bHasHelmet, "DT_CSPlayer", "m_bHasHelmet");
    NETVAR(bool, m_bIsScoped, "DT_CSPlayer", "m_bIsScoped");;
    NETVAR(float, m_flLowerBodyYawTarget, "DT_CSPlayer", "m_flLowerBodyYawTarget");
    NETVAR(int32_t, m_iHealth, "DT_BasePlayer", "m_iHealth");
    NETVAR(int32_t, m_lifeState, "DT_BasePlayer", "m_lifeState");
    NETVAR(int32_t, m_fFlags, "DT_BasePlayer", "m_fFlags");
    NETVAR(int32_t, m_nTickBase, "DT_BasePlayer", "m_nTickBase");
    NETVAR(Vector, m_vecViewOffset, "DT_BasePlayer", "m_vecViewOffset[0]");
    NETVAR(QAngle, m_viewPunchAngle, "DT_BasePlayer", "m_viewPunchAngle");
    NETVAR(QAngle, m_aimPunchAngle, "DT_BasePlayer", "m_aimPunchAngle");
    NETVAR(CHandle<C_BaseViewModel>, m_hViewModel, "DT_BasePlayer", "m_hViewModel[0]");
    NETVAR(Vector, m_vecVelocity, "DT_BasePlayer", "m_vecVelocity[0]");
    NETVAR(float, m_flMaxspeed, "DT_BasePlayer", "m_flMaxspeed");
    NETVAR(CHandle<C_BasePlayer>, m_hObserverTarget, "DT_BasePlayer", "m_hObserverTarget");
    NETVAR(float, m_flFlashMaxAlpha, "DT_CSPlayer", "m_flFlashMaxAlpha");
    NETVAR(int32_t, m_nHitboxSet, "DT_BaseAnimating", "m_nHitboxSet");
    NETVAR(CHandle<C_BaseCombatWeapon>, m_hActiveWeapon, "DT_BaseCombatCharacter", "m_hActiveWeapon");
    NETVAR(int32_t, m_iAccount, "DT_CSPlayer", "m_iAccount");
    NETVAR(float, m_flFlashDuration, "DT_CSPlayer", "m_flFlashDuration");
    NETVAR(float, m_flSimulationTime, "DT_BaseEntity", "m_flSimulationTime");
    NETVAR(float, m_flCycle, "DT_BaseAnimating", "m_flCycle");
    NETVAR(int, m_nSequence, "DT_BaseViewModel", "m_nSequence");
    NETVAR(float, m_flNextAttack, "DT_BaseCombatCharacter", "m_flNextAttack");

    //NETVAR(int, m_iAccount, "DT_CSPlayer", "m_iAccount");
    class C_BaseHudChat
    {
    public:
        enum ChatFilters
        {
            CHAT_FILTER_NONE = 0,
            CHAT_FILTER_JOINLEAVE = 0x000001,
            CHAT_FILTER_NAMECHANGE = 0x000002,
            CHAT_FILTER_PUBLICCHAT = 0x000004,
            CHAT_FILTER_SERVERMSG = 0x000008,
            CHAT_FILTER_TEAMCHANGE = 0x000010,
            CHAT_FILTER_ACHIEVEMENT = 0x000020,
        };

        void ChatPrintf(int iPlayerIndex, int iFilter, const char* fmt, ...)
        {
            char msg[1024];
            va_list args;
            va_start(args, fmt);
            vsnprintf(msg, 1024, fmt, args);
            CallVFunction<void(__cdecl*)(void*, int, int, const char*, ...)>(this, 27)(this, iPlayerIndex, iFilter, fmt);
            va_end(args);
        }
    };

    NETVAR(QAngle, m_angAbsAngles, "DT_BaseEntity", "m_angAbsAngles");
    NETVAR(Vector, m_angAbsOrigin, "DT_BaseEntity", "m_angAbsOrigin");
    NETVAR(float, m_flDuckSpeed, "DT_BasePlayer", "m_flDuckSpeed");
    NETVAR(float, m_flDuckAmount, "DT_BasePlayer", "m_flDuckAmount");
    std::array<float, 24> &m_flPoseParameter() const {
        static int _m_flPoseParameter = NetvarSys::Get().GetOffset("DT_BaseAnimating", "m_flPoseParameter");
        return *(std::array<float, 24>*)((uintptr_t)this + _m_flPoseParameter);
    }


    PNETVAR(CHandle<C_BaseCombatWeapon>, m_hMyWeapons, "DT_BaseCombatCharacter", "m_hMyWeapons");
    PNETVAR(CHandle<C_BaseAttributableItem>, m_hMyWearables, "DT_BaseCombatCharacter", "m_hMyWearables");
    PNETVAR(char, m_szLastPlaceName, "DT_BasePlayer", "m_szLastPlaceName");


    NETPROP(m_flLowerBodyYawTargetProp, "DT_CSPlayer", "m_flLowerBodyYawTarget");
    CUserCmd*& m_pCurrentCommand();

    /*gladiator v2*/
    void InvalidateBoneCache();
    int GetNumAnimOverlays();
    AnimationLayer *GetAnimOverlays();
    AnimationLayer *GetAnimOverlay(int i);
    int GetSequenceActivity(int sequence);
    CCSGOPlayerAnimState *GetPlayerAnimState();

    static void UpdateAnimationState(CCSGOPlayerAnimState *state, QAngle angle);
    static void ResetAnimationState(CCSGOPlayerAnimState *state);
    void CreateAnimationState(CCSGOPlayerAnimState *state);

    float_t &m_surfaceFriction()
    {
        static unsigned int _m_surfaceFriction = Utils::FindInDataMap(GetPredDescMap(), "m_surfaceFriction");
        return *(float_t*)((uintptr_t)this + _m_surfaceFriction);
    }
    Vector &m_vecBaseVelocity()
    {
        static unsigned int _m_vecBaseVelocity = Utils::FindInDataMap(GetPredDescMap(), "m_vecBaseVelocity");
        return *(Vector*)((uintptr_t)this + _m_vecBaseVelocity);
    }

    float_t &m_flMaxspeed()
    {
        static unsigned int _m_flMaxspeed = Utils::FindInDataMap(GetPredDescMap(), "m_flMaxspeed");
        return *(float_t*)((uintptr_t)this + _m_flMaxspeed);
    }

        float& C_BasePlayer::m_flHealthShotBoostExpirationTime()
    {
        static int m_flHealthShotBoostExpirationTime = NetvarSys::Get().GetOffset("DT_CSPlayer", "m_flHealthShotBoostExpirationTime");

        return *(float*)((uintptr_t)this + m_flHealthShotBoostExpirationTime);
    }



    Vector        GetEyePos();
    player_info_t GetPlayerInfo();
    bool          IsAlive();
    bool          IsFlashed();
    bool          HasC4();
    Vector        GetHitboxPos(int hitbox_id);
    mstudiobbox_t * GetHitbox(int hitbox_id);
    bool          GetHitboxPos(int hitbox, Vector &output);
    Vector        GetBonePos(int bone);
    bool          CanSeePlayer(C_BasePlayer* player, int hitbox);
    bool          CanSeePlayer(C_BasePlayer* player, const Vector& pos);
    void UpdateClientSideAnimation();
    Vector        abs_origin();

    int m_nMoveType();
    QAngle * GetVAngles();
    float_t m_flSpawnTime();

};
1651501942929.pngВ чем прикол?
 
zzz
Участник
Статус
Оффлайн
Регистрация
25 Сен 2017
Сообщения
899
Реакции[?]
306
Поинты[?]
6K
C++:
auto g_ChatElement = FindHudElement<C_BasePlayer::C_BaseHudChat>("CHudChat");
C++:
class C_BasePlayer : public C_BaseEntity
{
public:
    static __forceinline C_BasePlayer* GetPlayerByUserId(int id)
    {
        return static_cast<C_BasePlayer*>(GetEntityByIndex(g_EngineClient->GetPlayerForUserID(id)));
    }
    static __forceinline C_BasePlayer* GetPlayerByIndex(int i)
    {
        return static_cast<C_BasePlayer*>(GetEntityByIndex(i));
    }

    NETVAR(bool, m_bHasDefuser, "DT_CSPlayer", "m_bHasDefuser");
    NETVAR(bool, m_bGunGameImmunity, "DT_CSPlayer", "m_bGunGameImmunity");
    NETVAR(int32_t, m_iShotsFired, "DT_CSPlayer", "m_iShotsFired");
    NETVAR(QAngle, m_angEyeAngles, "DT_CSPlayer", "m_angEyeAngles[0]");
    NETVAR(int, m_ArmorValue, "DT_CSPlayer", "m_ArmorValue");
    NETVAR(bool, m_bHasHeavyArmor, "DT_CSPlayer", "m_bHasHeavyArmor");
    NETVAR(bool, m_bHasHelmet, "DT_CSPlayer", "m_bHasHelmet");
    NETVAR(bool, m_bIsScoped, "DT_CSPlayer", "m_bIsScoped");;
    NETVAR(float, m_flLowerBodyYawTarget, "DT_CSPlayer", "m_flLowerBodyYawTarget");
    NETVAR(int32_t, m_iHealth, "DT_BasePlayer", "m_iHealth");
    NETVAR(int32_t, m_lifeState, "DT_BasePlayer", "m_lifeState");
    NETVAR(int32_t, m_fFlags, "DT_BasePlayer", "m_fFlags");
    NETVAR(int32_t, m_nTickBase, "DT_BasePlayer", "m_nTickBase");
    NETVAR(Vector, m_vecViewOffset, "DT_BasePlayer", "m_vecViewOffset[0]");
    NETVAR(QAngle, m_viewPunchAngle, "DT_BasePlayer", "m_viewPunchAngle");
    NETVAR(QAngle, m_aimPunchAngle, "DT_BasePlayer", "m_aimPunchAngle");
    NETVAR(CHandle<C_BaseViewModel>, m_hViewModel, "DT_BasePlayer", "m_hViewModel[0]");
    NETVAR(Vector, m_vecVelocity, "DT_BasePlayer", "m_vecVelocity[0]");
    NETVAR(float, m_flMaxspeed, "DT_BasePlayer", "m_flMaxspeed");
    NETVAR(CHandle<C_BasePlayer>, m_hObserverTarget, "DT_BasePlayer", "m_hObserverTarget");
    NETVAR(float, m_flFlashMaxAlpha, "DT_CSPlayer", "m_flFlashMaxAlpha");
    NETVAR(int32_t, m_nHitboxSet, "DT_BaseAnimating", "m_nHitboxSet");
    NETVAR(CHandle<C_BaseCombatWeapon>, m_hActiveWeapon, "DT_BaseCombatCharacter", "m_hActiveWeapon");
    NETVAR(int32_t, m_iAccount, "DT_CSPlayer", "m_iAccount");
    NETVAR(float, m_flFlashDuration, "DT_CSPlayer", "m_flFlashDuration");
    NETVAR(float, m_flSimulationTime, "DT_BaseEntity", "m_flSimulationTime");
    NETVAR(float, m_flCycle, "DT_BaseAnimating", "m_flCycle");
    NETVAR(int, m_nSequence, "DT_BaseViewModel", "m_nSequence");
    NETVAR(float, m_flNextAttack, "DT_BaseCombatCharacter", "m_flNextAttack");

    //NETVAR(int, m_iAccount, "DT_CSPlayer", "m_iAccount");
    class C_BaseHudChat
    {
    public:
        enum ChatFilters
        {
            CHAT_FILTER_NONE = 0,
            CHAT_FILTER_JOINLEAVE = 0x000001,
            CHAT_FILTER_NAMECHANGE = 0x000002,
            CHAT_FILTER_PUBLICCHAT = 0x000004,
            CHAT_FILTER_SERVERMSG = 0x000008,
            CHAT_FILTER_TEAMCHANGE = 0x000010,
            CHAT_FILTER_ACHIEVEMENT = 0x000020,
        };

        void ChatPrintf(int iPlayerIndex, int iFilter, const char* fmt, ...)
        {
            char msg[1024];
            va_list args;
            va_start(args, fmt);
            vsnprintf(msg, 1024, fmt, args);
            CallVFunction<void(__cdecl*)(void*, int, int, const char*, ...)>(this, 27)(this, iPlayerIndex, iFilter, fmt);
            va_end(args);
        }
    };

    NETVAR(QAngle, m_angAbsAngles, "DT_BaseEntity", "m_angAbsAngles");
    NETVAR(Vector, m_angAbsOrigin, "DT_BaseEntity", "m_angAbsOrigin");
    NETVAR(float, m_flDuckSpeed, "DT_BasePlayer", "m_flDuckSpeed");
    NETVAR(float, m_flDuckAmount, "DT_BasePlayer", "m_flDuckAmount");
    std::array<float, 24> &m_flPoseParameter() const {
        static int _m_flPoseParameter = NetvarSys::Get().GetOffset("DT_BaseAnimating", "m_flPoseParameter");
        return *(std::array<float, 24>*)((uintptr_t)this + _m_flPoseParameter);
    }


    PNETVAR(CHandle<C_BaseCombatWeapon>, m_hMyWeapons, "DT_BaseCombatCharacter", "m_hMyWeapons");
    PNETVAR(CHandle<C_BaseAttributableItem>, m_hMyWearables, "DT_BaseCombatCharacter", "m_hMyWearables");
    PNETVAR(char, m_szLastPlaceName, "DT_BasePlayer", "m_szLastPlaceName");


    NETPROP(m_flLowerBodyYawTargetProp, "DT_CSPlayer", "m_flLowerBodyYawTarget");
    CUserCmd*& m_pCurrentCommand();

    /*gladiator v2*/
    void InvalidateBoneCache();
    int GetNumAnimOverlays();
    AnimationLayer *GetAnimOverlays();
    AnimationLayer *GetAnimOverlay(int i);
    int GetSequenceActivity(int sequence);
    CCSGOPlayerAnimState *GetPlayerAnimState();

    static void UpdateAnimationState(CCSGOPlayerAnimState *state, QAngle angle);
    static void ResetAnimationState(CCSGOPlayerAnimState *state);
    void CreateAnimationState(CCSGOPlayerAnimState *state);

    float_t &m_surfaceFriction()
    {
        static unsigned int _m_surfaceFriction = Utils::FindInDataMap(GetPredDescMap(), "m_surfaceFriction");
        return *(float_t*)((uintptr_t)this + _m_surfaceFriction);
    }
    Vector &m_vecBaseVelocity()
    {
        static unsigned int _m_vecBaseVelocity = Utils::FindInDataMap(GetPredDescMap(), "m_vecBaseVelocity");
        return *(Vector*)((uintptr_t)this + _m_vecBaseVelocity);
    }

    float_t &m_flMaxspeed()
    {
        static unsigned int _m_flMaxspeed = Utils::FindInDataMap(GetPredDescMap(), "m_flMaxspeed");
        return *(float_t*)((uintptr_t)this + _m_flMaxspeed);
    }

        float& C_BasePlayer::m_flHealthShotBoostExpirationTime()
    {
        static int m_flHealthShotBoostExpirationTime = NetvarSys::Get().GetOffset("DT_CSPlayer", "m_flHealthShotBoostExpirationTime");

        return *(float*)((uintptr_t)this + m_flHealthShotBoostExpirationTime);
    }



    Vector        GetEyePos();
    player_info_t GetPlayerInfo();
    bool          IsAlive();
    bool          IsFlashed();
    bool          HasC4();
    Vector        GetHitboxPos(int hitbox_id);
    mstudiobbox_t * GetHitbox(int hitbox_id);
    bool          GetHitboxPos(int hitbox, Vector &output);
    Vector        GetBonePos(int bone);
    bool          CanSeePlayer(C_BasePlayer* player, int hitbox);
    bool          CanSeePlayer(C_BasePlayer* player, const Vector& pos);
    void UpdateClientSideAnimation();
    Vector        abs_origin();

    int m_nMoveType();
    QAngle * GetVAngles();
    float_t m_flSpawnTime();

};
Посмотреть вложение 202046В чем прикол?
лучше покажи определение для "FindHudElement"
 
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
Пользователь
Статус
Оффлайн
Регистрация
10 Июн 2017
Сообщения
677
Реакции[?]
117
Поинты[?]
0
лучше покажи определение для "FindHudElement"
static auto FindHudElement(const char* name)
{
static auto pThis = *reinterpret_cast<DWORD**>(Utils::PatternScan2("client.dll", "B9 ? ? ? ? E8 ? ? ? ? 8B 5D 08") + 1);

static auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(Utils::PatternScan2("client.dll", "55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28"));
return find_hud_element(pThis, name);
}
 
zzz
Участник
Статус
Оффлайн
Регистрация
25 Сен 2017
Сообщения
899
Реакции[?]
306
Поинты[?]
6K
Последнее редактирование:
Похожие темы
Сверху Снизу