-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
std::unordered_map< int, char > m_weapon_icons =
{
{ WEAPON_DEAGLE, 'A' },
{ WEAPON_DUALBERETTA, 'B' },
{ WEAPON_FIVESEVEN, 'C' },
{ WEAPON_GLOCK, 'D' },
{ WEAPON_AK47, 'W' },
{ WEAPON_AUG, 'U' },
{ WEAPON_AWP, 'Z' },
{ WEAPON_FAMAS, 'R' },
{ WEAPON_G3SG1, 'X' },
{ WEAPON_GALIL, 'Q' },
{ WEAPON_M249, 'g' },
{ WEAPON_M4A1, 'S' },
{ WEAPON_MAC10, 'K' },
{ WEAPON_P90, 'P' },
{ WEAPON_MP5SD, 'N' },
{ WEAPON_UMP45, 'L' },
{ WEAPON_XM1014, 'b' },
{ WEAPON_BIZON, 'M' },
{ WEAPON_MAG7, 'd' },
{ WEAPON_NEGEV, 'f' },
{ WEAPON_SAWEDOFF, 'c' },
{ WEAPON_TEC9, 'H' },
{ WEAPON_ZEUSX27, 'h' },
{ WEAPON_P2000, 'E' },
{ WEAPON_MP7, 'E' },
{ WEAPON_MP9, 'O' },
{ WEAPON_NOVA, 'e' },
{ WEAPON_P250, 'F' },
{ WEAPON_SCAR20, 'Y' },
{ WEAPON_SG553, 'V' },
{ WEAPON_SSG08, 'a' },
{ WEAPON_KNIFE, '[' },
{ WEAPON_FLASHBANG, 'i' },
{ WEAPON_HEGRENADE, 'j' },
{ WEAPON_SMOKEGRENADE, 'k' },
{ WEAPON_MOLOTOV, 'l' },
{ WEAPON_DECOY, 'm' },
{ WEAPON_INC, 'n' },
{ WEAPON_C4, 'o' },
{ WEAPON_KNIFE_T, '[' },
{ WEAPON_M4A1S, 'T' },
{ WEAPON_USPS, 'G' },
{ WEAPON_CZ75, 'I' },
{ WEAPON_REVOLVER, 'J' },
{ WEAPON_KNIFE_BAYONET, '1' },
{ WEAPON_KNIFE_FLIP, '2' },
{ WEAPON_KNIFE_GUT, '3' },
{ WEAPON_KNIFE_KARAMBIT, '4' },
{ WEAPON_KNIFE_M9_BAYONET, '5' },
{ WEAPON_KNIFE_TACTICAL, '6' },
{ WEAPON_KNIFE_FALCHION, '0' },
{ WEAPON_KNIFE_SURVIVAL_BOWIE, '7' },
{ WEAPON_KNIFE_BUTTERFLY, '8' },
{ WEAPON_KNIFE_PUSH, '9' },
{ WEAPON_KNIFE_CORD, '[' },
{ WEAPON_KNIFE_CANIS, '[' },
{ WEAPON_KNIFE_URSUS, '[' },
{ WEAPON_KNIFE_GYPSY_JACKKNIFE, '[' },
{ WEAPON_KNIFE_OUTDOOR, '[' },
{ WEAPON_KNIFE_STILETTO, '[' },
{ WEAPON_KNIFE_WIDOWMAKER, '[' },
{ WEAPON_KNIFE_SKELETON, '[' },
{ WEAPON_HEALTHSHOT, 'u' },
{ WEAPON_SHIELD, 'p' },
{ WEAPON_TAGRENADE, 'i' },
{ WEAPON_BREACHCHARGE, 'o' }
};
Использование
C++:
if (vars.visuals.weapon)
{
auto clr = vars.visuals.weapon_color;
auto weap_info = weapon->GetCSWpnData();
char wpn_name[100] = "";
auto wpn_name_size = ImGui::CalcTextSize(wpn_name);
if (weap_info)
{
ImVec2 pos = ImVec2(box.x - 15 + box.w / 2 - wpn_name_size.x / 2, box.y + 1 + box.h + (count++ * 6.f));
ImGui::PushFont(fonts::iconfont);
std::string icon = tfm::format(("%c"), m_weapon_icons[weapon->GetItemDefinitionIndex()]);
g_Render->_drawList->AddTextShadow(pos, clr.u32(), icon.c_str());
ImGui::PopFont();
}
}
Вложения
-
43.5 KB Просмотры: 323