• Я зарабатываю 100 000 RUB / месяц на этом сайте!

    А знаешь как? Я всего-лишь публикую (создаю темы), а админ мне платит. Трачу деньги на мороженое, робуксы и сервера в Minecraft. А ещё на паль из Китая. 

    Хочешь так же? Пиши и узнавай условия: https://t.me/alex_redact
    Реклама: https://t.me/yougame_official

Вопрос Спектатор лист не работает

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
2 Ноя 2024
Сообщения
22
Реакции
3
код:

C++:
Expand Collapse Copy
std::set<std::string> spectatorsz;
std::map<int, std::string> playerlist;
bool show_spectator_list = false;

void GetSpectatorList() {
    spectatorsz.clear();
    playerlist.clear();
    uintptr_t LocalPlayer = *reinterpret_cast<uintptr_t*>(entities::client + offsets::local_controller);
    if (!LocalPlayer) return;
    uintptr_t localPlayerPawn = *reinterpret_cast<uintptr_t*>(LocalPlayer + offsets::m_hPawn);
    uintptr_t entityList = entities::client + offsets::entity_list;
    uintptr_t localPlayerPawn1 = *reinterpret_cast<uintptr_t*>(entityList + 0x10);
    uintptr_t CSlocalPlayerPawn = *reinterpret_cast<uintptr_t*>(localPlayerPawn1 + 120 * (localPlayerPawn & 0x1FF));
    int localTeam = *reinterpret_cast<int*>(LocalPlayer + offsets::team);
    for (int i = 1; i < 64; i++) {
        uintptr_t list_entry1 = *reinterpret_cast<uintptr_t*>(entityList + (8 * (i & 0x7FFF) >> 9) + 16);
        if (!list_entry1) continue;
        uintptr_t playerController = *reinterpret_cast<uintptr_t*>(list_entry1 + 120 * (i & 0x1FF));
        if (!playerController) continue;
        uint32_t spectatorPawn = *reinterpret_cast<uint32_t*>(playerController + offsets::m_hPawn);
        if (!spectatorPawn) continue;
        uintptr_t listEntrySecond = *reinterpret_cast<uintptr_t*>(entityList + 0x8 * ((spectatorPawn & 0x7FFF) >> 9) + 16);
        if (!listEntrySecond) continue;
        uintptr_t pawn = *reinterpret_cast<uintptr_t*>(listEntrySecond + 120 * (spectatorPawn & 0x1FF));
        if (!pawn) continue;
        int TeamID = *reinterpret_cast<int*>(pawn + offsets::team);
        int health = *reinterpret_cast<int*>(pawn + offsets::health);
        uintptr_t observed = *reinterpret_cast<uintptr_t*>(pawn + offsets::m_pObserverServices);
        uint64_t observedTarget = *reinterpret_cast<uintptr_t*>(observed + offsets::m_hObserverTarget);
        auto listEntrySecond1 = *reinterpret_cast<uintptr_t*>(entityList + (0x8 * ((observedTarget & 0x7FFF) >> 9)) + 16);
        auto spectatorTarget = *reinterpret_cast<uintptr_t*>(listEntrySecond + 120 * (observedTarget & 0x1FF));
        const size_t length = 128;
        char buffer[length] = { 0 };
        memcpy(buffer, reinterpret_cast<void*>(playerController + offsets::name), sizeof(buffer));
        std::string PlayerNamer(buffer);
        playerlist[i] = PlayerNamer;
        if (observed) {
            if (spectatorTarget == CSlocalPlayerPawn) {
                spectatorsz.insert(PlayerNamer);
            }
        }
    }
}
 
Назад
Сверху Снизу