Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Вопрос Player pawn

хаслер
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
8 Дек 2020
Сообщения
145
Реакции
27
после обновалние когда получаю pawn через get_entry_index у меня get_base_entity всегда nullptr

C++:
Expand Collapse Copy
    template<class T = c_base_entity>
    T* get_base_entity(int index) {
        static auto fn = reinterpret_cast<T * (__fastcall*)(c_entity_system*, int)>(c_modules::get().client.get()->find(
            c_address::get().pattern(_x("base_entity"))
        ).get());
        return fn(this, index);
    }

получение entity
C++:
Expand Collapse Copy
void c_entity::initialize() {
    int highest_index = c_interfaces::get().get_entity_system()->get_highest_entiy_index();

    for (int i = 0; i <= highest_index; i++) {
        c_entity_instance* entity = c_interfaces::get().get_entity_system()->get_base_entity(i);
        if (!entity) continue;

        const char* class_name = entity->get_entity_class_name();
        if (!class_name) continue;

        m_entities[class_name].emplace_back(entity);
    }
}
 
после обновалние когда получаю pawn через get_entry_index у меня get_base_entity всегда nullptr

C++:
Expand Collapse Copy
    template<class T = c_base_entity>
    T* get_base_entity(int index) {
        static auto fn = reinterpret_cast<T * (__fastcall*)(c_entity_system*, int)>(c_modules::get().client.get()->find(
            c_address::get().pattern(_x("base_entity"))
        ).get());
        return fn(this, index);
    }

получение entity
C++:
Expand Collapse Copy
void c_entity::initialize() {
    int highest_index = c_interfaces::get().get_entity_system()->get_highest_entiy_index();

    for (int i = 0; i <= highest_index; i++) {
        c_entity_instance* entity = c_interfaces::get().get_entity_system()->get_base_entity(i);
        if (!entity) continue;

        const char* class_name = entity->get_entity_class_name();
        if (!class_name) continue;

        m_entities[class_name].emplace_back(entity);
    }
}
какой паттерн у base_entity?
также покажи как ты получаешь get_highest_entiy_index и get_entity_class_name
 
какой паттерн у base_entity?
также покажи как ты получаешь get_highest_entiy_index и get_entity_class_name
Код:
Expand Collapse Copy
add(_x("entity_system"), _x("48 8B 1D ? ? ? ? 48 89 1D ? ? ? ? 4C 63 B3"));
add(_x("base_entity"), _x("4C 8D 49 10 81 FA ?? ?? 00 00 77 ?? 8B CA C1 F9 09"));

m_entity_system = c_modules::get().client.get()->find(c_address::get().pattern(_x("entity_system"))).relative(3, 7).deref().as<c_entity_system*>();
 
Код:
Expand Collapse Copy
add(_x("entity_system"), _x("48 8B 1D ? ? ? ? 48 89 1D ? ? ? ? 4C 63 B3"));
add(_x("base_entity"), _x("4C 8D 49 10 81 FA ?? ?? 00 00 77 ?? 8B CA C1 F9 09"));

m_entity_system = c_modules::get().client.get()->find(c_address::get().pattern(_x("entity_system"))).relative(3, 7).deref().as<c_entity_system*>();
base_entity -> 4C 8D 49 ? 81 FA @client.dll
 
если что 4C 8D 49 10 81 FA ?? ?? 00 00 77 ?? 8B CA C1 F9 09 она тоже ведет на sub_18096A550 как и 4C 8D 49 ? 81 FA
ладно, видимо я где то один символ не докопировал чтоб проверить

get_highest_entiy_index и get_entity_class_name как получаешь?
 
ладно, видимо я где то один символ не докопировал чтоб проверить

get_highest_entiy_index и get_entity_class_name как получаешь?
Код:
Expand Collapse Copy
    schema_class_info_data_t* get_schema_class_info() {
        schema_class_info_data_t* class_info{};

        c_memory::get().call_vfunc<void>(this, 44, &class_info);

        return class_info;
    }

    const char* get_entity_class_name() {
        schema_class_info_data_t* class_info{};

        class_info = get_schema_class_info();
        if (!class_info) return nullptr;

        return class_info->name;
    }

    int get_highest_entiy_index() {
        return *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(this) + 0x20A0);
    }
 
Код:
Expand Collapse Copy
    schema_class_info_data_t* get_schema_class_info() {
        schema_class_info_data_t* class_info{};

        c_memory::get().call_vfunc<void>(this, 44, &class_info);

        return class_info;
    }

    const char* get_entity_class_name() {
        schema_class_info_data_t* class_info{};

        class_info = get_schema_class_info();
        if (!class_info) return nullptr;

        return class_info->name;
    }

    int get_highest_entiy_index() {
        return *reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(this) + 0x20A0);
    }
хз все валид вроде
может у тебя какие то филды в шеме не дампятся поэтому и выдают nullptr при обращении
 
Назад
Сверху Снизу