Меньше слов, больше дроч.. то есть дела
Для любителей легита Sound ESP
Скрытое содержимое
Приятного паста деланья
static CUtlVector<SndInfo_t> sndList;
g_EngineSound->GetActiveSounds(sndList);
for (auto i = 0; i < sndList.Count(); i++)
{
const SndInfo_t sound = sndList.Element(i);
if (!sound.m_nSoundSource)
continue;
if (sound.m_nChannel != 4)
continue;
if (!sound.m_bUpdatePositions)
continue;
C_BasePlayer* entity = C_BasePlayer::GetPlayerByIndex(sound.m_nSoundSource);
if (!entity || !entity->IsPlayer() || !entity->IsAlive() || entity == g_LocalPlayer)
continue;
const bool is_enemy = entity->IsEnemy();
if (is_enemy && !g_Options.visualising.main_esp.player_enemies)
continue;
if (!is_enemy && !g_Options.visualising.main_esp.player_teammates)
continue;
if (!sound.m_pOrigin)
continue;
g_SoundEsp->AddSound(*sound.m_pOrigin, is_enemy);
}
void AddSound(Vector origin, bool is_enemy)
{
for (auto& soundinfo : sound) {
if (soundinfo.origin == origin)
return;
}
Sounds entry;
entry.time = GetTickCount64();
entry.origin = origin;
entry.enemy = is_enemy;
sound.push_back(entry);
}