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

  • Автор темы Автор темы meth0d
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
3 Окт 2021
Сообщения
9
Реакции
10
95875
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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

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

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

    return m_weaponsys()->GetWpnData(this->m_iItemDefinitionIndex());
}
 
95875
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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

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

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

    return m_weaponsys()->GetWpnData(this->m_iItemDefinitionIndex());
}
это в пабе с 18 года :roflanPominki:
 
95875
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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#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++:
Expand Collapse Copy
#include "../interfaces/IWeaponSystem.hpp" // ~31 line

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

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

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