singhhdev/CS2-Internal-SkinChanger-Inventory-Changer

Knife Paintkit doesn't apply

Opened this issue · 0 comments

Right so, I fixed up some things like outdated Vtable indices, etc.. however now im running into a issue where my Knife model changes, but the paintkit doesn't, this is my code for adding the Knife:

        CEconItem* pItem = CEconItem::CreateInstance();
        if (pItem) {
            CCSPlayerInventory* pInventory =
                CCSPlayerInventory::GetInstance();

            auto highestIDs = pInventory->GetHighestIDs();

            pItem->m_ulID = highestIDs.first + 1;
            pItem->m_unInventory = highestIDs.second + 1;
            pItem->m_unAccountID =
                uint32_t(pInventory->GetOwner().m_id);
            pItem->m_unDefIndex = WEAPON_M9_BAYONET;
            pItem->m_nQuality = 0;
            pItem->m_nRarity = 4;

            pItem->SetPaintKit((float)856.f);
            pItem->SetPaintSeed(1.f);
            if (pInventory->AddEconItem(pItem))
                skin_changer::AddEconItemToList(pItem);
        }

And then in-game it's just a vanilla m9, does anybody know what's wrong?