if (g_menu.main.aimbot.targe_limit.get()) {
if (m_targets.size() >= g_menu.main.aimbot.target_limit_ammount.get()) {
auto first = rand() % m_targets.size();
auto second = rand() % m_targets.size();
auto third = rand() % m_targets.size();
auto fourthly = rand() % m_targets.size();
auto fifth = rand() % m_targets.size();
auto sixth = rand() % m_targets.size();
auto seventh = rand() % m_targets.size();
auto eighth = rand() % m_targets.size();
auto ninth = rand() % m_targets.size();
auto tenth = rand() % m_targets.size();
switch (int(g_menu.main.aimbot.target_limit_ammount.get())) {
case 1:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 2:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 3:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 4:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 5:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 6:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth || i == sixth)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 7:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth || i == sixth || i == seventh)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 8:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth || i == sixth || i == seventh || i == eighth)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 9:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth || i == sixth || i == seventh || i == eighth || i == ninth)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
case 10:
for (auto i = 0; i < m_targets.size(); ++i) {
if (i == first || i == second || i == third || i == fourthly || i == fifth || i == sixth || i == seventh || i == eighth || i == ninth || i == tenth)
continue;
m_targets.erase(m_targets.begin() + i);
if (i > 0)
--i;
}
break;
default:
break;
}
}
}