Участник
- Статус
- Оффлайн
- Регистрация
- 4 Авг 2017
- Сообщения
- 491
- Реакции
- 212
В связи с некоторыми личностями, выкладывающие паблик контент под хайдом в 200 симпатий, я хочу вам выложить исходник этой полезной функции.
Написана под CSGOSimple. Вставлять в Visuals.cpp
Credits : https://yougame.biz/members/79490/
P.S. Хайд я все равно не вижу, но я абсолютно уверен,что там тоже самое.
C++:
void Visuals::RenderItemEsp(C_BaseEntity* ent)
{
std::string itemstr = "Undefined";
const model_t * itemModel = ent->GetModel();
if (!itemModel)
return;
studiohdr_t * hdr = g_MdlInfo->GetStudiomodel(itemModel);
if (!hdr)
return;
itemstr = hdr->szName;
if (itemstr.find("case_pistol") != std::string::npos)
itemstr = "Pistol Case";
else if (itemstr.find("case_light_weapon") != std::string::npos)
itemstr = "Light Case";
else if (itemstr.find("case_heavy_weapon") != std::string::npos)
itemstr = "Heavy Case";
else if (itemstr.find("case_explosive") != std::string::npos)
itemstr = "Explosive Case";
else if (itemstr.find("case_tools") != std::string::npos)
itemstr = "Tools Case";
else if (itemstr.find("random") != std::string::npos)
itemstr = "Airdrop";
else if (itemstr.find("dz_armor_helmet") != std::string::npos)
itemstr = "Full Armor";
else if (itemstr.find("dz_helmet") != std::string::npos)
itemstr = "Helmet";
else if (itemstr.find("dz_armor") != std::string::npos)
itemstr = "Armor";
else if (itemstr.find("upgrade_tablet") != std::string::npos)
itemstr = "Tablet Upgrade";
else if (itemstr.find("briefcase") != std::string::npos)
itemstr = "Briefcase";
else if (itemstr.find("parachutepack") != std::string::npos)
itemstr = "Parachute";
else if (itemstr.find("dufflebag") != std::string::npos)
itemstr = "Cash Dufflebag";
else if (itemstr.find("ammobox") != std::string::npos)
itemstr = "Ammobox";
auto bbox = GetBBox(ent);
if (bbox.right == 0 || bbox.bottom == 0)
return;
auto sz = g_pDefaultFont->CalcTextSizeA(14.f, FLT_MAX, 0.0f, itemstr.c_str());
int w = bbox.right - bbox.left;
Render::Get().RenderText(itemstr, ImVec2((bbox.left + w * 0.5f) - sz.x * 0.5f, bbox.bottom + 1), 14.f, g_Options.color_esp_item);
}
Написана под CSGOSimple. Вставлять в Visuals.cpp
Пожалуйста, авторизуйтесь для просмотра ссылки.
P.S. Хайд я все равно не вижу, но я абсолютно уверен,что там тоже самое.
Последнее редактирование: