Гайд Legendware V3 Custom Operator changer [spoonfeed]

Пользователь
Пользователь
Статус
Оффлайн
Регистрация
30 Авг 2020
Сообщения
64
Реакции
44

Okay, here is full spoonfeed with includes, cuz some people will not understand even how to define and hook classes :LUL:

1. IClientNetworkable.hpp

C++:
Expand Collapse Copy
#pragma once

class IClientUnknown;
class ClientClass;
class bf_read;

class IClientNetworkable
{
public:
    virtual IClientUnknown*  GetIClientUnknown() = 0;
    virtual void             Release() = 0;
    virtual ClientClass*     GetClientClass() = 0;
    virtual void             NotifyShouldTransmit(int state) = 0;
    virtual void             OnPreDataChanged(int updateType) = 0;
    virtual void             OnDataChanged(int updateType) = 0;
    virtual void             PreDataUpdate(int updateType) = 0;
    virtual void             PostDataUpdate(int updateType) = 0;
    virtual void             __unkn(void) = 0;
    virtual bool             IsDormant(void) = 0;
    virtual int              EntIndex(void) const = 0;
    virtual void             ReceiveMessage(int classID, bf_read& msg) = 0;
    virtual void*            GetDataTableBasePtr() = 0;
    virtual void             SetDestroyedOnRecreateEntities(void) = 0;
};

// classes, definitions
#include <cstddef>

namespace VirtualMethod
{
    template <typename T, std::size_t Idx, typename ...Args>
    constexpr auto call(void* classBase, Args... args) noexcept
    {
        return ((*reinterpret_cast<T(__thiscall***)(void*, Args...)>(classBase))[Idx])(classBase, args...);
    }
}

#define VIRTUAL_METHOD(returnType, name, idx, args, argsRaw) \
constexpr auto name args noexcept \
{ \
    return VirtualMethod::call<returnType, idx>argsRaw; \
}

class NetworkStringTable {
public:
    VIRTUAL_METHOD(int, addString, 8, (bool isServer, const char* value, int length = -1, const void* userdata = nullptr), (this, isServer, value, length, userdata))
};

class NetworkStringTableContainer {
public:
    VIRTUAL_METHOD(NetworkStringTable*, findTable, 3, (const char* name), (this, name))
};

2. csgo.hpp

C++:
Expand Collapse Copy
#pragma once

#include "..\sdk\interfaces\IVEngineClient.hpp"
#include "..\sdk\interfaces\IInputSystem.hpp"
#include "..\sdk\interfaces\IBaseClientDll.hpp"
#include "..\sdk\interfaces\IClientEntityList.hpp"
#include "..\sdk\interfaces\IClientMode.hpp"
#include "..\sdk\interfaces\ICvar.hpp"
#include "..\sdk\interfaces\IEngineTrace.hpp"
#include "..\sdk\interfaces\IEngineSound.hpp"
#include "..\sdk\interfaces\IRenderView.hpp"
#include "..\sdk\interfaces\IVModelRender.hpp"
#include "..\sdk\interfaces\IMaterialSystem.hpp"
#include "..\sdk\interfaces\IPanel.hpp"
#include "..\sdk\interfaces\IVModelInfoClient.hpp"
#include "..\sdk\interfaces\IMDLCache.hpp"
#include "..\sdk\interfaces\memalloc.h"
#include "..\sdk\interfaces\CClientState.hpp"
#include "..\sdk\interfaces\IPrediction.hpp"
#include "..\sdk\interfaces\IMoveHelper.hpp"
#include "..\sdk\interfaces\CInput.hpp"
#include "..\sdk\interfaces\ISurface.hpp"
#include "..\sdk\interfaces\IVDebugOverlay.hpp"
#include "..\sdk\interfaces\IViewRenderBeams.hpp"
#include "..\sdk\interfaces\IPhysics.hpp"
#include "..\sdk\interfaces\ILocalize.hpp"
#include "..\sdk\interfaces\ISoundServices.hpp"
#include "..\sdk\misc\GlobalVars.hpp"
#include "..\sdk\misc\glow_outline_effect.hpp"
#include "..\sdk\interfaces\IGameEventManager.hpp"
#include "..\sdk\misc\C_CSPlayerResource.h"

#include <d3dx9.h>
#include <d3d9.h>

class InterfaceReg
{
private:
    using InstantiateInterfaceFn = void*(*)();
public:
    InstantiateInterfaceFn m_CreateFn;
    const char *m_pName;
    InterfaceReg *m_pNext;
};

class C_CSGO
{
public:
    IDirect3DDevice9 * m_device();
    IVEngineClient * m_engine();
    IInputSystem * m_inputsys();
    IBaseClientDLL * m_client();
    IClientEntityList * m_entitylist();
    ICvar * m_cvar();
    IEngineTrace * m_trace();
    IEngineSound * m_enginesound();
    DWORD * m_inputinternal();
    IVRenderView * m_renderview();
    IMDLCache * m_modelcache();
    IVModelRender * m_modelrender();
    IMaterialSystem * m_materialsystem();
    IPanel * m_panel();
    IVModelInfoClient * m_modelinfo();
    IPrediction * m_prediction();
    IGameMovement * m_gamemovement();
    ISurface * m_surface();
    IVDebugOverlay * m_debugoverlay();
    IPhysicsSurfaceProps * m_physsurface();
    IGameEventManager2 * m_eventmanager();
    IViewRenderBeams * m_viewrenderbeams();
    IMemAlloc * m_memalloc();
    IClientMode * m_clientmode();
    CGlobalVarsBase * m_globals();
    CGlowObjectManager * m_glow();
    CClientState * m_clientstate();
    IMoveHelper * m_movehelper();
    CInput * m_input();
    C_CSPlayerResource * m_playerresource();
    CSGameRulesProxy * m_gamerules();
    ILocalize * m_localize();
    IBaseFileSystem* m_basefilesys();

    NetworkStringTableContainer* m_networkStringTableContainer();

    DWORD m_postprocessing();
    DWORD m_ccsplayerrenderablevftable();
private:
    IDirect3DDevice9 * p_device = nullptr;
    IVEngineClient * p_engine = nullptr;
    IInputSystem * p_inputsys = nullptr;
    IBaseClientDLL * p_client = nullptr;
    IClientEntityList * p_entitylist = nullptr;
    IEngineTrace * p_trace = nullptr;
    IEngineSound * p_enginesound = nullptr;
    ICvar * p_cvar = nullptr;
    DWORD * p_inputinternal = nullptr;
    IVRenderView * p_renderview = nullptr;
    IMDLCache* p_modelcache = nullptr;
    IVModelRender * p_modelrender = nullptr;
    IMaterialSystem * p_materialsystem = nullptr;
    IPanel * p_panel = nullptr;
    IVModelInfoClient * p_modelinfo = nullptr;
    IPrediction * p_prediciton = nullptr;
    IGameMovement * p_gamemovement = nullptr;
    ISurface * p_surface = nullptr;
    IVDebugOverlay * p_debugoverlay = nullptr;
    IPhysicsSurfaceProps * p_physsurface = nullptr;
    IGameEventManager2 * p_eventmanager = nullptr;
    IViewRenderBeams * p_viewrenderbeams = nullptr;
    IMemAlloc * p_memalloc = nullptr;
    IClientMode * p_clientmode = nullptr;
    CGlobalVarsBase * p_globals = nullptr;
    CGlowObjectManager * p_glow = nullptr;
    CClientState * p_clientstate = nullptr;
    IMoveHelper * p_movehelper = nullptr;
    CInput * p_input = nullptr;
    C_CSPlayerResource * p_playerresource = nullptr;
    CSGameRulesProxy * p_gamerules = nullptr;
    ILocalize * p_localize = nullptr;
    IBaseFileSystem* p_basefilesys = nullptr;

    NetworkStringTableContainer* p_networkStringTableContainer = nullptr;

    DWORD p_postprocessing = 0;
    DWORD p_ccsplayerrenderablevftable = 0;
};

extern C_CSGO g_csgo;

3. csgo.cpp

C++:
Expand Collapse Copy
// This is an independent project of an individual developer. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com

#include "csgo.hpp"
#include "..\includes.hpp"

C_CSGO g_csgo;

#undef m_client
#undef m_clientmode
#undef m_clientstate
#undef m_cvar
#undef m_debugoverlay
#undef m_device
#undef m_engine
#undef m_enginesound
#undef m_entitylist
#undef m_eventmanager
#undef m_gamemovement
#undef m_gamerules
#undef m_globals
#undef m_glow
#undef m_input
#undef m_inputinternal
#undef m_inputsys
#undef m_localize
#undef m_materialsystem
#undef m_memalloc
#undef m_modelcache
#undef m_modelinfo
#undef m_modelrender
#undef m_movehelper
#undef m_panel
#undef m_physsurface
#undef m_playerresource
#undef m_postprocessing
#undef m_prediction
#undef m_renderview
#undef m_surface
#undef m_trace
#undef m_viewrenderbeams
#undef m_soundservices
#undef m_basefilesys
#undef m_networkStringTableContainer

template<typename T>
static T *get_interface(const char *mod_name, const char *interface_name, bool exact = false) {
    T *iface = nullptr;
    InterfaceReg *register_list;
    int part_match_len = strlen(interface_name); //-V103

    DWORD interface_fn = reinterpret_cast<DWORD>(GetProcAddress(GetModuleHandleA(mod_name), crypt_str("CreateInterface")));

    if (!interface_fn) {
        return nullptr;
    }

    unsigned int jump_start = (unsigned int)(interface_fn)+4;
    unsigned int jump_target = jump_start + *(unsigned int*)(jump_start + 1) + 5;

    register_list = **reinterpret_cast<InterfaceReg***>(jump_target + 6);

    for (InterfaceReg *cur = register_list; cur; cur = cur->m_pNext) {
        if (exact == true) {
            if (strcmp(cur->m_pName, interface_name) == 0)
                iface = reinterpret_cast<T*>(cur->m_CreateFn());
        }
        else {
            if (!strncmp(cur->m_pName, interface_name, part_match_len) && std::atoi(cur->m_pName + part_match_len) > 0) //-V106
                iface = reinterpret_cast<T*>(cur->m_CreateFn());
        }
    }
    return iface;
}

IDirect3DDevice9 * C_CSGO::m_device() {
    if (!p_device)
        p_device = **reinterpret_cast<IDirect3DDevice9***>(util::FindSignature(crypt_str("shaderapidx9.dll"), g_ctx.signatures.at(0).c_str()) + 0x1);

    return p_device;
}

IVEngineClient * C_CSGO::m_engine() {
    if (!p_engine)
        p_engine = get_interface<IVEngineClient>(crypt_str("engine.dll"), crypt_str("VEngineClient"));

    return p_engine;
}

IInputSystem * C_CSGO::m_inputsys() {
    if (!p_inputsys)
        p_inputsys = get_interface<IInputSystem>(crypt_str("inputsystem.dll"), crypt_str("InputSystemVersion"));

    return p_inputsys;
}

IBaseClientDLL * C_CSGO::m_client() {
    if (!p_client)
        p_client = get_interface<IBaseClientDLL>(crypt_str("client.dll"), crypt_str("VClient0"));

    return p_client;
}

IClientEntityList * C_CSGO::m_entitylist() {
    if (!p_entitylist)
        p_entitylist = get_interface<IClientEntityList>(crypt_str("client.dll"), crypt_str("VClientEntityList"));

    return p_entitylist;
}

ICvar * C_CSGO::m_cvar() {
    if (!p_cvar)
        p_cvar = get_interface<ICvar>(crypt_str("vstdlib.dll"), crypt_str("VEngineCvar"));

    return p_cvar;
}

IEngineTrace * C_CSGO::m_trace() {
    if (!p_trace)
        p_trace = get_interface<IEngineTrace>(crypt_str("engine.dll"), crypt_str("EngineTraceClient"));

    return p_trace;
}

IEngineSound* C_CSGO::m_enginesound() {
    if (!p_enginesound)
        p_enginesound = get_interface<IEngineSound>(crypt_str("engine.dll"), crypt_str("IEngineSoundClient"));

    return p_enginesound;
}

DWORD* C_CSGO::m_inputinternal() {
    if (!p_inputinternal)
        p_inputinternal = get_interface<DWORD>(crypt_str("vgui2.dll"), crypt_str("VGUI_InputInternal"));

    return p_inputinternal;
}

IVRenderView * C_CSGO::m_renderview() {
    if (!p_renderview)
        p_renderview = get_interface<IVRenderView>(crypt_str("engine.dll"), crypt_str("VEngineRenderView"));

    return p_renderview;
}

IMDLCache * C_CSGO::m_modelcache() {
    if (!p_modelcache)
        p_modelcache = get_interface<IMDLCache>(crypt_str("datacache.dll"), crypt_str("MDLCache"));

    return p_modelcache;
}

IVModelRender * C_CSGO::m_modelrender() {
    if (!p_modelrender)
        p_modelrender = get_interface<IVModelRender>(crypt_str("engine.dll"), crypt_str("VEngineModel"));

    return p_modelrender;
}

IMaterialSystem * C_CSGO::m_materialsystem() {
    if (!p_materialsystem)
        p_materialsystem = get_interface<IMaterialSystem>(crypt_str("materialsystem.dll"), crypt_str("VMaterialSystem"));

    return p_materialsystem;
}

IPanel * C_CSGO::m_panel() {
    if (!p_panel)
        p_panel = get_interface<IPanel>(crypt_str("vgui2.dll"), crypt_str("VGUI_Panel"));

    return p_panel;
}

IVModelInfoClient * C_CSGO::m_modelinfo() {
    if (!p_modelinfo)
        p_modelinfo = get_interface<IVModelInfoClient>(crypt_str("engine.dll"), crypt_str("VModelInfoClient"));

    return p_modelinfo;
}

IPrediction * C_CSGO::m_prediction() {
    if (!p_prediciton)
        p_prediciton = get_interface<IPrediction>(crypt_str("client.dll"), crypt_str("VClientPrediction"));

    return p_prediciton;
}

IGameMovement * C_CSGO::m_gamemovement() {
    if (!p_gamemovement)
        p_gamemovement = get_interface<IGameMovement>(crypt_str("client.dll"), crypt_str("GameMovement"));

    return p_gamemovement;
}

ISurface * C_CSGO::m_surface() {
    if (!p_surface)
        p_surface = get_interface<ISurface>(crypt_str("vguimatsurface.dll"), crypt_str("VGUI_Surface"));

    return p_surface;
}

IVDebugOverlay * C_CSGO::m_debugoverlay() {
    if (!p_debugoverlay)
        p_debugoverlay = get_interface<IVDebugOverlay>(crypt_str("engine.dll"), crypt_str("VDebugOverlay"));

    return p_debugoverlay;
}

IPhysicsSurfaceProps * C_CSGO::m_physsurface() {
    if (!p_physsurface)
        p_physsurface = get_interface< IPhysicsSurfaceProps >(crypt_str("vphysics.dll"), crypt_str("VPhysicsSurfaceProps"));

    return p_physsurface;
}

IGameEventManager2 * C_CSGO::m_eventmanager() {
    if (!p_eventmanager)
        p_eventmanager = get_interface<IGameEventManager2>(crypt_str("engine.dll"), crypt_str("GAMEEVENTSMANAGER002"), true);

    return p_eventmanager;
}

IViewRenderBeams * C_CSGO::m_viewrenderbeams() {
    if (!p_viewrenderbeams)
        p_viewrenderbeams = *reinterpret_cast<IViewRenderBeams **>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(1).c_str()) + 0x1);

    return p_viewrenderbeams;
}

IMemAlloc * C_CSGO::m_memalloc() {
    if (!p_memalloc)
        p_memalloc = *reinterpret_cast<IMemAlloc**>(GetProcAddress(GetModuleHandle(crypt_str("tier0.dll")), crypt_str("g_pMemAlloc")));

    return p_memalloc;
}

IClientMode * C_CSGO::m_clientmode() {
    if (!p_clientmode)
        p_clientmode = **reinterpret_cast<IClientMode***>((*(DWORD**)(m_client()))[10] + 0x5);

    return p_clientmode;
}

CGlobalVarsBase * C_CSGO::m_globals() {
    if (!p_globals)
        p_globals = **reinterpret_cast<CGlobalVarsBase***>((*(DWORD**)(m_client()))[0] + 0x1F);

    return p_globals;
}

CGlowObjectManager * C_CSGO::m_glow() {
    if (!p_glow)
        p_glow = *reinterpret_cast<CGlowObjectManager**>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(2).c_str()) + 0x3);

    return p_glow;
}

CClientState * C_CSGO::m_clientstate() {
    if (!p_clientstate)
        p_clientstate = **reinterpret_cast<CClientState***> ((*reinterpret_cast<uintptr_t**> (m_engine()))[12] + 0x10);

    return p_clientstate;
}

IMoveHelper * C_CSGO::m_movehelper() {
    if (!p_movehelper)
        p_movehelper = **reinterpret_cast<IMoveHelper***>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(3).c_str()) + 0x2);

    return p_movehelper;
}

CInput * C_CSGO::m_input() {
    if (!p_input)
        p_input = *reinterpret_cast<CInput**>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(4).c_str()) + 0x1);

    return p_input;
}

C_CSPlayerResource * C_CSGO::m_playerresource() {
    if (!p_playerresource)
        p_playerresource = **reinterpret_cast<C_CSPlayerResource ***>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(5).c_str()) + 0x2);
    else if (g_ctx.globals.should_update_playerresource)
    {
        g_ctx.globals.should_update_playerresource = false;
        p_playerresource = **reinterpret_cast<C_CSPlayerResource ***>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(5).c_str()) + 0x2);
    }

    return p_playerresource;
}

CSGameRulesProxy * C_CSGO::m_gamerules() {
    if (!p_gamerules)
        p_gamerules = **reinterpret_cast<CSGameRulesProxy ***>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(6).c_str()) + 0x1);
    else if (g_ctx.globals.should_update_gamerules)
    {
        g_ctx.globals.should_update_gamerules = false;
        p_gamerules = **reinterpret_cast<CSGameRulesProxy ***>(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(6).c_str()) + 0x1);
    }

    return p_gamerules;
}

IBaseFileSystem* C_CSGO::m_basefilesys() {
    if (!p_basefilesys)
        p_basefilesys = get_interface<IBaseFileSystem>("filesystem_stdio.dll", "VBaseFileSystem");

    return p_basefilesys;
}

ILocalize * C_CSGO::m_localize()
{
    if (!p_localize)
        p_localize = get_interface< ILocalize >(crypt_str("localize.dll"), crypt_str("Localize_"));

    return p_localize;
}

NetworkStringTableContainer* C_CSGO::m_networkStringTableContainer() {
    if (!p_networkStringTableContainer)
        p_networkStringTableContainer = get_interface< NetworkStringTableContainer >(crypt_str("engine.dll"), crypt_str("VEngineClientStringTable"));

    return p_networkStringTableContainer;
}

DWORD C_CSGO::m_postprocessing() {
    if (!p_postprocessing)
        p_postprocessing = *(DWORD*)(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(7).c_str()) + 0x2);
  
    return p_postprocessing;
}

DWORD C_CSGO::m_ccsplayerrenderablevftable() {
    if (!p_ccsplayerrenderablevftable)
        p_ccsplayerrenderablevftable = *(DWORD *)(util::FindSignature(crypt_str("client.dll"), g_ctx.signatures.at(8).c_str()) + 0x4E);

    return p_ccsplayerrenderablevftable;
}

4. includes.hpp
Just add here at the end

C++:
Expand Collapse Copy
#define m_networkStringTableContainer g_csgo.m_networkStringTableContainer

// will use bool this later
extern bool LoadPlayerMdlOnce;

5. SkinChanger.cpp
Add this code at the beginning of source

C++:
Expand Collapse Copy
bool LoadPlayerMdlOnce = false;

// Load custom model
bool LoadModel(const char* thisModelName)
{
    const auto CustomModel = m_networkStringTableContainer()->findTable("modelprecache");

    if (CustomModel)
    {
        m_modelinfo()->GetModelIndex(thisModelName);
        int MdlNum = CustomModel->addString(false, thisModelName);
        if (MdlNum == NULL)
            return false;
    }
    return true;
}

// one by one
void InitCustomModels()
{
    // only once, no need to spam this every frame...
    // cache will be reloaded each new map
    if (!LoadPlayerMdlOnce)
    {
        LoadModel("models/player/custom_player/kuristaja/cso2/mila/mila.mdl");

        LoadPlayerMdlOnce = true;
    }
}

6. Add your model now to the player list - SkinChanger.cpp
C++:
Expand Collapse Copy
// todo - separation for various team models.
static const char* player_model_index_t[] =
{
    "models/player/custom_player/legacy/tm_phoenix_variantf.mdl",
    "models/player/custom_player/legacy/tm_phoenix_varianth.mdl",
    "models/player/custom_player/legacy/tm_leet_variantg.mdl",
    "models/player/custom_player/legacy/tm_balkan_varianti.mdl",
    "models/player/custom_player/legacy/tm_leet_varianth.mdl",
    "models/player/custom_player/legacy/tm_phoenix_variantg.mdl",
    "models/player/custom_player/legacy/tm_balkan_variantf.mdl",
    "models/player/custom_player/legacy/tm_balkan_variantj.mdl",
    "models/player/custom_player/legacy/tm_leet_varianti.mdl",
    "models/player/custom_player/legacy/tm_balkan_variantg.mdl",
    "models/player/custom_player/legacy/tm_balkan_varianth.mdl",
    "models/player/custom_player/legacy/tm_leet_variantf.mdl",
    "models/player/custom_player/kuristaja/cso2/mila/mila.mdl"
};

static const char* player_model_index_ct[] =
{
    "models/player/custom_player/legacy/ctm_st6_variante.mdl",
    "models/player/custom_player/legacy/ctm_st6_variantk.mdl",
    "models/player/custom_player/legacy/ctm_fbi_variantf.mdl",
    "models/player/custom_player/legacy/ctm_sas_variantf.mdl",
    "models/player/custom_player/legacy/ctm_fbi_variantg.mdl",
    "models/player/custom_player/legacy/ctm_st6_variantg.mdl",
    "models/player/custom_player/legacy/ctm_st6_variantm.mdl",
    "models/player/custom_player/legacy/ctm_st6_varianti.mdl",
    "models/player/custom_player/legacy/ctm_fbi_variantb.mdl",
    "models/player/custom_player/kuristaja/cso2/mila/mila.mdl"
};

7. Goto SkinChanger.cpp function run and add precache

C++:
Expand Collapse Copy
void SkinChanger::run(ClientFrameStage_t stage) noexcept
{
    if (stage != FRAME_NET_UPDATE_POSTDATAUPDATE_START)
        return;

    if (!g_ctx.local())
        return;

    // load custom models
    InitCustomModels();

8. Add now to menu list >_< constchars.h
C++:
Expand Collapse Copy
const char* player_model_t[] =
{
    "None",
    "Enforcer",
    "Soldier",
    "Ground Rebel",
    "Maximus",
    "Osiris",
    "Slingshot",
    "Dragomir",
    "Blackwolf",
    "Prof. Shahmat",
    "Rezan The Ready",
    "Doctor Romanov",
    "Mr. Muhlik",
    "CS Online 2: Mila"
};

const char* player_model_ct[] =
{
    "None",
    "Seal Team 6",
    "3rd Commando",
    "Operator FBI",
    "Squadron Officer",
    "Markus Delrow",
    "Buckshot",
    "McCoy",
    "Commander Ricksaw",
    "Agent Ava",
    "CS Online 2: Mila"
};

9. Now we need to set our bool to false again, if we are disconnected or map is changing
Do it doesn't matter where... I prefer function HUD_REDRAW, so goto hooked_painttraverse.cpp
C++:
Expand Collapse Copy
void __fastcall hooks::hooked_painttraverse(void* ecx, void* edx, vgui::VPANEL panel, bool force_repaint, bool allow_force)
{
    static auto original_fn = panel_hook->get_func_address <PaintTraverse_t> (41);
    g_ctx.local((player_t*)m_entitylist()->GetClientEntity(m_engine()->GetLocalPlayer()), true); //-V807

    // reset if not ingame, or is not connected
    if (!m_engine()->IsInGame() || !m_engine()->IsConnected())
        LoadPlayerMdlOnce = false;

Remember! Model path are defined into it's source, so if you want to create your own model path - you need to decompile .mdl file and set your own.
I'm using Crowbar for example.
Ok, you've done everything, you are cool cucumber now :pandal:
If you have a questions, just ask, gonna release this now for supremacy :pandal:
 
Последнее редактирование:
oh yeah mister crabs
 
trash code, but ok
 
throw off your model)
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
what was that media
 
1603632610144.png
 
пиздец
1603633822545.png
....
 
I still don't really understand how to implement your own playermodels? Could you explain a little bit on what you should do after decompiling the mdl files. Also I'm crashing when attempting to use custom playermodels?

If I debug it points to this.

Код:
Expand Collapse Copy
    _NODISCARD static _CONSTEXPR17 size_t length (_In_z_ const char * const _First) noexcept // strengthened
        {// find length of null-terminated string
#if _HAS_CXX17
        return (__builtin_strlen (_First));
#else / * _HAS_CXX17 * /
        return (_CSTD strlen (_First));
#endif / * _HAS_CXX17 * /
        }
 
I still don't really understand how to implement your own playermodels? Could you explain a little bit on what you should do after decompiling the mdl files. Also I'm crashing when attempting to use custom playermodels?

If I debug it points to this.

Код:
Expand Collapse Copy
    _NODISCARD static _CONSTEXPR17 size_t length (_In_z_ const char * const _First) noexcept // strengthened
        {// find length of null-terminated string
#if _HAS_CXX17
        return (__builtin_strlen (_First));
#else / * _HAS_CXX17 * /
        return (_CSTD strlen (_First));
#endif / * _HAS_CXX17 * /
        }

To add your own model you need:
1) Goto the SkinChanger.cpp file
1.1) Find "InitCustomModels" and add a link to your model
1.2) Find "player_model_index_t" and add a link to your model
Пожалуйста, авторизуйтесь для просмотра ссылки.

2) Goto constchars.cpp
2.1) Find "player_model_t" and add the name of your model (any)
Пожалуйста, авторизуйтесь для просмотра ссылки.

3)
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
[QUOTE = "toil, post: 1800919, member: 205775"]
To add your own model you need:
1) Goto the SkinChanger.cpp file
1.1) Find "InitCustomModels" and add a link to your model
1.2) Find "player_model_index_t" and add a link to your model
Пожалуйста, авторизуйтесь для просмотра ссылки.

2) Goto constchars.cpp
2.1) Find "player_model_t" and add the name of your model (any)
Пожалуйста, авторизуйтесь для просмотра ссылки.

3)
Пожалуйста, авторизуйтесь для просмотра ссылки.

[/ QUOTE]

Okay I got it to not crash however now I'm just completely invisible lmao.
 
[QUOTE = "toil, post: 1800919, member: 205775"]
To add your own model you need:
1) Goto the SkinChanger.cpp file
1.1) Find "InitCustomModels" and add a link to your model
1.2) Find "player_model_index_t" and add a link to your model
Пожалуйста, авторизуйтесь для просмотра ссылки.

2) Goto constchars.cpp
2.1) Find "player_model_t" and add the name of your model (any)
Пожалуйста, авторизуйтесь для просмотра ссылки.

3)
Пожалуйста, авторизуйтесь для просмотра ссылки.

[/ QUOTE]

Okay I got it to not crash however now I'm just completely invisible lmao.

This does not work on official servers
 
Anyone knows how to fix the weapon icons/nade icons they dont work for me
 
Назад
Сверху Снизу