What's new

Welcome to HvH Forum!

SignUp Now! Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, And More!


SignUp Now!

Request Help with Item skin parser

Newbie HvHer
User ID
10107
Messages
4
Reactions
3
Level
4
Warning
THIS IS PASTED FROM AIRFLOW
IM A SHITTY PASTER DONT MIND ME


Please if anyone has any idea of what im doing wrong please tell me/help me.

csgo.cpp:
m_item_schema         = (CItemSchema*)pattern::find( m_client_dll, XOR("A1 ? ? ? ? 85 C0 75 53") ).add( 0x4 ).as< std::uintptr_t(__cdecl*)() >();

skins.cpp:
void Skins::init()

{

    std::string items{ };



    std::cout << "Initializing skin parser...\n";



    // Check if the file can be opened and read

    if (std::ifstream file{ XOR("csgo/scripts/items/items_game_cdn.txt") })

    {

        std::cout << "Reading items from file...\n";

        items = { std::istreambuf_iterator{ file }, {} };

    }

    else

    {

        std::cerr << "Error: Could not open items file!\n";

    }



    if (items.empty())

    {

        std::cerr << "Error: Items file is empty or failed to load.\n";

        return;

    }



    std::cout << "Items successfully loaded. Parsing paint kits...\n";



    for (int i = 0; i <= g_csgo.m_item_schema->paint_kits.last_element; ++i)

    {

        const auto& paint_kit = g_csgo.m_item_schema->paint_kits.memory[i]._value;



        std::cout << "Processing paint kit ID: " << paint_kit->id << "\n";



        if (paint_kit->id == 9001 || paint_kit->id >= 10000)

        {

            std::cout << "Skipping paint kit ID: " << paint_kit->id << " (invalid ID)\n";

            continue;

        }



        auto name = math::ToString(g_csgo.m_localize->Find(paint_kit->item_name.buffer + 1));



        if (name == "-")

        {

            std::cout << "Skipping paint kit ID: " << paint_kit->id << " (invalid name)\n";

            continue;

        }



        std::cout << "Adding paint kit: " << name << " with ID: " << paint_kit->id << "\n";

        m_paint_kits.emplace_back(std::make_pair(name, paint_kit->id));

    }



    std::cout << "Sorting paint kits...\n";



    std::sort(m_paint_kits.begin(), m_paint_kits.end(),[&](const std::pair< std::string, int >& a, const std::pair< std::string, int >& b){return a.first < b.first;});



    std::cout << "Paint kits sorted successfully.\n";

}

itemschema.h:
#pragma once





template < typename key, typename value >

struct node_t

{

    int prev_id{ };

    int next_id{ };

    void* unknown_ptr{ };

    int unk{ };

    key _key{ };

    value _value{ };

};



template < typename key, typename value >

struct head_t

{

    node_t< key, value >* memory{ };

    int alloc_count{ };

    int grow_siez{ };

    int start_element{ };

    int next_available{ };

    int _unknown{ };

    int last_element{ };

};



struct string_t

{

    char* buffer{ };

    int capacity{ };

    int grow_size{ };

    int length{ };

};



struct paint_kit_t

{

    int id{ };

    string_t name{ };

    string_t description{ };

    string_t item_name{ };

};



struct sticker_kit_t

{

    int id{ };



    PAD(36);



    string_t item_name{ };

};



class CItemSchema

{

    PAD(0x28C);



public:

    head_t< int, paint_kit_t* > paint_kits{ };



private:

    PAD(0x8);



public:

    head_t< int, sticker_kit_t* > sticker_kits{ };

};


Screenshot of my debug after injecting.

1727524513754.png
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Top