Исходник IWeaponSystem (GetWpnData for EndScene or Present hook)

Начинающий
Статус
Оффлайн
Регистрация
3 Окт 2021
Сообщения
9
Реакции[?]
10
Поинты[?]
0
This will help you fix this pop-up window, often this happens due to rendering in the EndScene or Present hook.
I did it on the example of Legendware, since many people face this problem on this source.

IWeaponSystem.hpp (create this in interfaces):
C++:
#pragma once
class weapon_info_t;

class IWeaponSystem
{
public:
    virtual ~IWeaponSystem() = 0;
    virtual void pad04() = 0;
    virtual weapon_info_t* GetWpnData(int weaponId) = 0;
};
csgo.cpp:
C++:
#undef m_weaponsys /// ~ 41 line
IWeaponSystem* C_CSGO::m_weaponsys() {

    if (!p_weaponsys)
        p_weaponsys = *reinterpret_cast<IWeaponSystem**>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(21).c_str()) + 2);

    return p_weaponsys;
} /// ~340 line
csgo.hpp:
C++:
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

IWeaponSystem* m_weaponsys(); /// ~86 line

IWeaponSystem* p_weaponsys = nullptr; /// ~126 line
main.cpp (signatures):
C++:
crypt_str("8B 35 ? ? ? ? FF 10 0F B7 C0") /// ~68 line
includes.hpp :
C++:
#define m_weaponsys g_csgo.m_weaponsys /// ~97 line
struct_manager.cpp (replace GetWpnData to this):
C++:
weapon_info_t* weapon_t::get_csweapon_info() /// ~66 line
{
    if (!m_weaponsys())
        return nullptr;

    return m_weaponsys()->GetWpnData(this->m_iItemDefinitionIndex());
}
 
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,970
Реакции[?]
958
Поинты[?]
19K
This will help you fix this pop-up window, often this happens due to rendering in the EndScene or Present hook.
I did it on the example of Legendware, since many people face this problem on this source.

IWeaponSystem.hpp (create this in interfaces):
C++:
#pragma once
class weapon_info_t;

class IWeaponSystem
{
public:
    virtual ~IWeaponSystem() = 0;
    virtual void pad04() = 0;
    virtual weapon_info_t* GetWpnData(int weaponId) = 0;
};
csgo.cpp:
C++:
#undef m_weaponsys /// ~ 41 line
IWeaponSystem* C_CSGO::m_weaponsys() {

    if (!p_weaponsys)
        p_weaponsys = *reinterpret_cast<IWeaponSystem**>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(21).c_str()) + 2);

    return p_weaponsys;
} /// ~340 line
csgo.hpp:
C++:
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

IWeaponSystem* m_weaponsys(); /// ~86 line

IWeaponSystem* p_weaponsys = nullptr; /// ~126 line
main.cpp (signatures):
C++:
crypt_str("8B 35 ? ? ? ? FF 10 0F B7 C0") /// ~68 line
includes.hpp :
C++:
#define m_weaponsys g_csgo.m_weaponsys /// ~97 line
struct_manager.cpp (replace GetWpnData to this):
C++:
weapon_info_t* weapon_t::get_csweapon_info() /// ~66 line
{
    if (!m_weaponsys())
        return nullptr;

    return m_weaponsys()->GetWpnData(this->m_iItemDefinitionIndex());
}
это в пабе с 18 года :roflanPominki:
 
Участник
Статус
Оффлайн
Регистрация
30 Авг 2020
Сообщения
660
Реакции[?]
396
Поинты[?]
16K
This will help you fix this pop-up window, often this happens due to rendering in the EndScene or Present hook.
I did it on the example of Legendware, since many people face this problem on this source.

IWeaponSystem.hpp (create this in interfaces):
C++:
#pragma once
class weapon_info_t;

class IWeaponSystem
{
public:
    virtual ~IWeaponSystem() = 0;
    virtual void pad04() = 0;
    virtual weapon_info_t* GetWpnData(int weaponId) = 0;
};
csgo.cpp:
C++:
#undef m_weaponsys /// ~ 41 line
IWeaponSystem* C_CSGO::m_weaponsys() {

    if (!p_weaponsys)
        p_weaponsys = *reinterpret_cast<IWeaponSystem**>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(21).c_str()) + 2);

    return p_weaponsys;
} /// ~340 line
csgo.hpp:
C++:
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

IWeaponSystem* m_weaponsys(); /// ~86 line

IWeaponSystem* p_weaponsys = nullptr; /// ~126 line
main.cpp (signatures):
C++:
crypt_str("8B 35 ? ? ? ? FF 10 0F B7 C0") /// ~68 line
includes.hpp :
C++:
#define m_weaponsys g_csgo.m_weaponsys /// ~97 line
struct_manager.cpp (replace GetWpnData to this):
C++:
weapon_info_t* weapon_t::get_csweapon_info() /// ~66 line
{
    if (!m_weaponsys())
        return nullptr;

    return m_weaponsys()->GetWpnData(this->m_iItemDefinitionIndex());
}
Хватит щитпостить пожалуйста
 
Сверху Снизу