Guest User

Untitled

a guest
Dec 12th, 2018
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void playeresp::draw_weapon(player_t* m_entity, Box box) {
  2.  
  3. int _x = box.x + box.w + 1, _y = box.y;
  4. auto draw_flag2 = [&](Color color, const char * text, ...) -> void {
  5. render::get().text(fonts[ESPHEALTH], _x, _y, color, HFONT_CENTERED_NONE, text);
  6.  
  7. _y += 9;
  8. };
  9. if (!g_cfg.player.weapon)
  10. return;
  11.  
  12. player_info_t player_info;
  13. g_csgo.m_engine()->GetPlayerInfo(m_entity->EntIndex(), &player_info);
  14.  
  15.  
  16. int bottom_pos = 0;
  17.  
  18. auto weapon = m_entity->m_hActiveWeapon().Get();
  19.  
  20. if (!weapon)
  21. return;
  22.  
  23. bool drawing_ammo_bar = g_cfg.player.ammo == 1;
  24. bool drawing_lby_bar = g_cfg.player.lby;
  25.  
  26. if (weapon->is_non_aim() || !g_cfg.player.lby || player_info.fakeplayer || !g_cfg.ragebot.antiaim_correction)
  27. drawing_lby_bar = false;
  28.  
  29.  
  30. if (weapon->is_non_aim())
  31. drawing_ammo_bar = false;
  32.  
  33. auto color = m_entity->IsDormant() ? Color(130, 130, 130, 130) : g_cfg.player.weapon_color;
  34. color.SetAlpha(g_cfg.player.alpha * esp_alpha_fade[m_entity->EntIndex()]);
  35. //weapon->get_name()
  36. render::get().text(fonts[ESPHEALTH], box.x + (box.w / 2), box.y + box.h, Color(255, 255, 255, 255), HFONT_CENTERED_X, weapon->get_name());
  37. }
RAW Paste Data