Article FakeDuck Chams

DREDD

Administrator
Administrator

DREDD

Administrator
Administrator
Status
Offline
Joined
Apr 18, 2019
Messages
191
Reaction score
323
Code:
int __stdcall DrawModelExecute(void* context, void* state, ModelRenderInfo_t& info, matrix3x4_t* pCustomBoneToWorld)
    {
        std::string modelName = Source::m_pModelInfo->GetModelName(info.pModel);

        if (Source::m_pEngine->IsInGame() && cheat::main::local && Source::m_pClientState->m_iDeltaTick != -1 && info.pModel)
        {
            if (modelName.find("models/player") != std::string::npos)
            {
                auto model_ent = Source::m_pEntList->GetClientEntity(info.entity_index);

                if (model_ent == cheat::main::local && cheat::main::local->IsFakeducking())
                {
                    const auto max_duck_height = Source::m_pGameMovement->GetPlayerViewOffset(true).z;
                    const auto max_stand_height = Source::m_pGameMovement->GetPlayerViewOffset(false).z;

                    pCustomBoneToWorld[8].SetOrigin(Vector(pCustomBoneToWorld[8].GetOrigin().x, pCustomBoneToWorld[8].GetOrigin().y, cheat::main::local->m_vecOrigin().z + math::clamp((1.0f - cheat::main::local->m_flDuckAmount()) * max_stand_height, max_duck_height, max_stand_height)));
                }
            }
        }
 

bash

Newbie
Newbie

bash

Newbie
Newbie
Status
Offline
Joined
Jan 5, 2021
Messages
3
Reaction score
0
yoo thank you so much this is usefull for my paste xD
 
Top