[SOURCE] Glove changer for ayyware

Начинающий
Статус
Оффлайн
Регистрация
14 Июл 2017
Сообщения
12
Реакции[?]
2
Поинты[?]
0
Here you go !
Код:
bool bGlovesNeedUpdate;
void ApplyCustomGloves(IClientEntity* pLocal)
{

    if (bGlovesNeedUpdate || !pLocal->IsAlive())
    {
        DWORD* hMyWearables = (DWORD*)((size_t)pLocal + 0x2EF4);

        if (!Interfaces::EntList->GetClientEntity(hMyWearables[0] & 0xFFF))
        {
            for (ClientClass* pClass = Interfaces::Client->GetAllClasses(); pClass; pClass = pClass->m_pNext)
            {
                if (pClass->m_ClassID != (int)CSGOClassID::CEconWearable)
                    continue;

                int iEntry = (Interfaces::EntList->GetHighestEntityIndex() + 1);
                int    iSerial = RandomInt(0x0, 0xFFF);

                pClass->m_pCreateFn(iEntry, iSerial);
                hMyWearables[0] = iEntry | (iSerial << 16);

                break;
            }
        }

        player_info_t LocalPlayerInfo;
        Interfaces::Engine->GetPlayerInfo(Interfaces::Engine->GetLocalPlayer(), &LocalPlayerInfo);

        CBaseCombatWeapon* glovestochange = (CBaseCombatWeapon*)Interfaces::EntList->GetClientEntity(hMyWearables[0] & 0xFFF);

        // glove = static_cast <IClientUnknown*>(Interfaces::EntList->GetClientEntity(hMyWearables[0] & 0xFFF));
        if (!glovestochange)
            return;

        //glove->GetClientNetworkable()->SetDestroyedOnRecreateEntities();
        //glove->GetClientNetworkable()->Release();


        switch (Menu::Window.MiscTab.GloveModel.GetIndex())
        {
        case 1:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5027;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl")));
            //*glovestochange->ViewModelIndex() = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl");
            //*glovestochange->WorldModelIndex() = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl") + 1;
            break;
        }
        case 2:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5032;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_handwrap_leathery/v_glove_handwrap_leathery.mdl")));
            break;
        }
        case 3:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5031;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_slick/v_glove_slick.mdl")));
            break;
        }
        case 4:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5030;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_sporty/v_glove_sporty.mdl")));
            break;
        }
        case 5:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5033;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_motorcycle/v_glove_motorcycle.mdl")));
            break;
        }
        case 6:
        {
            *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5034;
            glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex(XorStr("models/weapons/v_models/arms/glove_specialist/v_glove_specialist.mdl")));
            break;
        }
        default:
            break;
        }

        switch (Menu::Window.MiscTab.GloveSkin.GetIndex())
        {
        case 0:
            break;
        case 1:
            *glovestochange->FallbackPaintKit() = 10007;
            break;
        case 2:
            *glovestochange->FallbackPaintKit() = 10006;
            break;
        case 3:
            *glovestochange->FallbackPaintKit() = 10039;
            break;
        case 4:
            *glovestochange->FallbackPaintKit() = 10008;
            break;
        case 5:
            *glovestochange->FallbackPaintKit() = 10021;
            break;
        case 6:
            *glovestochange->FallbackPaintKit() = 10036;
            break;
        case 7:
            *glovestochange->FallbackPaintKit() = 10009;
            break;
        case 8:
            *glovestochange->FallbackPaintKit() = 10010;
            break;
        case 9:
            *glovestochange->FallbackPaintKit() = 10016;
            break;
        case 10:
            *glovestochange->FallbackPaintKit() = 10013;
            break;
        case 11:
            *glovestochange->FallbackPaintKit() = 10040;
            break;
        case 12:
            *glovestochange->FallbackPaintKit() = 10015;
            break;
        case 13:
            *glovestochange->FallbackPaintKit() = 10037;
            break;
        case 14:
            *glovestochange->FallbackPaintKit() = 10038;
            break;
        case 15:
            *glovestochange->FallbackPaintKit() = 10018;
            break;
        case 16:
            *glovestochange->FallbackPaintKit() = 10019;
            break;
        case 17:
            *glovestochange->FallbackPaintKit() = 10026;
            break;
        case 18:
            *glovestochange->FallbackPaintKit() = 10028;
            break;
        case 19:
            *glovestochange->FallbackPaintKit() = 10027;
            break;
        case 20:
            *glovestochange->FallbackPaintKit() = 10024;
            break;
        case 21:
            *glovestochange->FallbackPaintKit() = 10033;
            break;
        case 22:
            *glovestochange->FallbackPaintKit() = 10034;
            break;
        case 23:
            *glovestochange->FallbackPaintKit() = 10035;
            break;
        case 24:
            *glovestochange->FallbackPaintKit() = 10030;
            break;
        }
        //*glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = whatever item definition index you want;
        //glovestochange->SetModelIndex(desired model index e.g.GLOVE_BLOOD in your case);
        //*glovestochange->FallbackPaintKit() = 10008;
        *glovestochange->m_AttributeManager()->m_Item()->ItemIDHigh() = -1; //you need to set this to apply the custom stuff you're setting (this is probably your issue)
        *glovestochange->FallbackWear() = 0.001f;
        *glovestochange->m_AttributeManager()->m_Item()->AccountID() = LocalPlayerInfo.m_nXuidLow;


        glovestochange->PreDataUpdate(0);
        bGlovesNeedUpdate = false;
    }
}
 
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
10 Июл 2017
Сообщения
19
Реакции[?]
13
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Разреши скинуть мне аууваре с перчами для тех кто не могет спастеть
 
Сверху Снизу