Korath
Platinum Üye
- Katılım
- 13 Şub 2026
- Mesajlar
- 168
- Beğeniler
- 49
- İletişim

int ApexLegends::GetSpectatorsCount(uintptr_t pLocalPlayer)
{
if (!pLocalPlayer)
return 0;
int count = 0;
const int maxEntities = 61;
uintptr_t observerList = read<uintptr_t>(g_Base + 0x612e688 + 0x20C8 ); // Off::OBSERVER_LIST or without 0x20C8
if (!observerList)
return 0;
for (int i = 0; i < maxEntities; i++)
{
uintptr_t pEntityBase = ApexLegends::GetEntityBase(i);
if (!pEntityBase)
continue;
int playerData = flux->read<int>(pEntityBase + 0x38); // Off::NAME_INDEX
int specIndex = flux->read<int>(observerList + playerData * 8 + 0x964 - 0x0004); // Off::OBSERVER_ARRAY or without 0x0004
uintptr_t specBase = flux->read<uintptr_t>(g_Base + APEXOffsets.dwEntityList + ((specIndex & 0xFFFF) << 5)); // Off::ENTITY_LIST
if (specBase == pLocalPlayer)
count++;
}
return count;
}
{
if (!pLocalPlayer)
return 0;
int count = 0;
const int maxEntities = 61;
uintptr_t observerList = read<uintptr_t>(g_Base + 0x612e688 + 0x20C8 ); // Off::OBSERVER_LIST or without 0x20C8
if (!observerList)
return 0;
for (int i = 0; i < maxEntities; i++)
{
uintptr_t pEntityBase = ApexLegends::GetEntityBase(i);
if (!pEntityBase)
continue;
int playerData = flux->read<int>(pEntityBase + 0x38); // Off::NAME_INDEX
int specIndex = flux->read<int>(observerList + playerData * 8 + 0x964 - 0x0004); // Off::OBSERVER_ARRAY or without 0x0004
uintptr_t specBase = flux->read<uintptr_t>(g_Base + APEXOffsets.dwEntityList + ((specIndex & 0xFFFF) << 5)); // Off::ENTITY_LIST
if (specBase == pLocalPlayer)
count++;
}
return count;
}