- Статус
- Оффлайн
- Регистрация
- 27 Июн 2019
- Сообщения
- 110
- Реакции
- 44
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
const wchar_t* to_wchar(const char* string) {
va_list va_alist;
char buf[1024];
va_start(va_alist, string);
_vsnprintf_s(buf, sizeof(buf), string, va_alist);
va_end(va_alist);
wchar_t wbuf[1024];
MultiByteToWideChar(CP_UTF8, 0, buf, 256, wbuf, 256);
return wbuf;
}
void otheresp::spectators() {
if (!g_cfg.esp.spectator_list)
return;
if (g_csgo.m_engine()->IsInGame() && g_csgo.m_engine()->IsConnected()) {
int index = 0;
int w, h;
g_csgo.m_engine()->GetScreenSize(w, h);
render::get().rect(931 + g_cfg.esp.spectator_list_x, 141 + g_cfg.esp.spectator_list_y, 200, 100, Color(0, 0, 0, 155));
render::get().rect_filled(931, 141, 200, 100, Color(0, 0, 0, 65));
render::get().rect_filled(937, 147, 188, 88, Color(0, 0, 0, 100));
render::get().rect_filled(941, 172, 180, 57, Color(12, 12, 12, 255));
render::get().rect(941, 172 + g_cfg.esp.spectator_list_y, 180, 57, Color(43, 43, 43, 155));
render::get().rect_filled(941, 161, 180, 2, Color(g_cfg.menu.menu_theme[0]));
render::get().rect_filled(941, 162, 180, 2, Color(g_cfg.menu.menu_theme[0]));
render::get().text(fonts[CTAB], 999, 148, Color(255, 255, 255), HFONT_OFF_SCREEN, "spectators");
for (int i = 1; i < 65; i++) {
auto p_local = static_cast<player_t*>(g_csgo.m_entitylist()->GetClientEntity(g_csgo.m_engine()->GetLocalPlayer()));
auto p_entity = static_cast<player_t*>(g_csgo.m_entitylist()->GetClientEntity(i));
player_info_t e_info;
if (p_entity && p_entity != p_local) {
g_csgo.m_engine()->GetPlayerInfo(i, &e_info);
if (!p_entity->is_alive() && !p_entity->IsDormant()) {
auto target = p_entity->m_hObserverTarget();
if (target) {
auto p_target = g_csgo.m_entitylist()->GetClientEntityFromHandle(target);
if (p_target == p_local) {
int x, y;
g_csgo.m_surface()->GetTextSize(fonts[ESPFLAG], to_wchar(e_info.szName), x, y);
std::string player_name = e_info.szName;
player_info_t p_info;
g_csgo.m_engine()->GetPlayerInfo(i, &e_info);
render::get().text(fonts[AIMWAREFONT], 946 + g_cfg.esp.spectator_list_x, 174 + g_cfg.esp.spectator_list_y + (10 * index), Color(255, 255, 255), HFONT_OFF_SCREEN, player_name.c_str());
index++;
}
}
}
}
}
}
}
ss:
Последнее редактирование:


