Draw Dropped Weapons

Начинающий
Статус
Оффлайн
Регистрация
6 Авг 2018
Сообщения
65
Реакции[?]
13
Поинты[?]
0
So I'm doing on that and I cant get the thing working.
The text draws on enemy absOrigin or just on enemy box like enemy weapon esp
thats my code right now
void CVisuals :: DrawDropped (SDK :: CBaseEntity * entity) {
Vector min, max;
entity-> GetRenderBounds (min, max);
Vector pos, pos3D, top, top3D;
pos3D = entity-> GetAbsOrigin () - Vector (0, 0, 10);
top3D = pos3D + Vector (0, 0, max.z + 10);

SDK :: CBaseWeapon * weapon_cast = (SDK :: CBaseWeapon *) entity;

if (! weapon_cast)
return;

auto weapon = INTERFACES :: ClientEntityList-> GetClientEntity (entity-> GetActiveWeaponIndex ());
auto c_baseweapon = reinterpret_cast <SDK :: CBaseWeapon *> (INTERFACES :: ClientEntityList-> GetClientEntity (entity-> GetActiveWeaponIndex ()));

if (! c_baseweapon)
return;

if (! weapon)
return;

SDK :: CBaseEntity * plr = INTERFACES :: ClientEntityList-> GetClientEntityFromHandle ((HANDLE) weapon_cast-> GetOwnerHandle ());
if (! plr && RENDER :: WorldToScreen (pos3D, pos) && RENDER :: WorldToScreen (top3D, top))
{
std :: string ItemName = fix_item_name (weapon-> GetClientClass () -> m_pNetworkName);
int height = (pos.y - top.y);
int width = height / 2;
RENDER :: DrawF (pos.x, pos.y, FONTS :: visuals_esp_font, true, WHITE, ItemName.c_str ()); // numpad_menu_font
}
}
 
Сверху Снизу