Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. void visuals::PlayerBox(float x, float y, float w, float h, Color clr)
  2. {
  3. g_Surface->DrawSetColor(clr);
  4. g_Surface->DrawOutlinedRect(int(x - w), int(y), int(x + w), int(y + h));
  5. g_Surface->DrawSetColor(Color::Black());
  6. g_Surface->DrawOutlinedRect(int(x - w - 1), int(y - 1), int(x + w + 1), int(y + h + 1));
  7. g_Surface->DrawOutlinedRect(int(x - w + 1), int(y + 1), int(x + w - 1), int(y + h - 1));
  8. }
  9.  
  10. Color visuals::GetPlayerColor(C_BaseEntity* entity, C_BaseEntity* local)
  11. {
  12. int TeamNum = entity->GetTeamNum();
  13. bool IsVis = MiscFunctions::IsVisible(local, entity, Head);
  14.  
  15. Color color;
  16. static float rainbow;
  17. rainbow += 0.005f;
  18. if (rainbow > 1.f)
  19. rainbow = 0.f;
  20. if (TeamNum == TEAM_CS_T)
  21. {
  22.  
  23. if (IsVis)
  24. color = Color(32, 130, 43);
  25. else
  26. color = Color(int(g_Options.Colors.box_color_t[0] * 255.f), int(g_Options.Colors.box_color_t[1] * 255.f), int(g_Options.Colors.box_color_t[2] * 255.f));
  27. }
  28. else
  29. {
  30. if (IsVis)
  31. color = Color(32, 130, 43);
  32. else
  33. color = Color(int(g_Options.Colors.box_color_ct[0] * 255.f), int(g_Options.Colors.box_color_ct[1] * 255.f), int(g_Options.Colors.box_color_ct[2] * 255.f));
  34. }
  35.  
  36.  
  37. return color;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement