Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void visuals::PlayerBox(float x, float y, float w, float h, Color clr)
- {
- g_Surface->DrawSetColor(clr);
- g_Surface->DrawOutlinedRect(int(x - w), int(y), int(x + w), int(y + h));
- g_Surface->DrawSetColor(Color::Black());
- g_Surface->DrawOutlinedRect(int(x - w - 1), int(y - 1), int(x + w + 1), int(y + h + 1));
- g_Surface->DrawOutlinedRect(int(x - w + 1), int(y + 1), int(x + w - 1), int(y + h - 1));
- }
- Color visuals::GetPlayerColor(C_BaseEntity* entity, C_BaseEntity* local)
- {
- int TeamNum = entity->GetTeamNum();
- bool IsVis = MiscFunctions::IsVisible(local, entity, Head);
- Color color;
- static float rainbow;
- rainbow += 0.005f;
- if (rainbow > 1.f)
- rainbow = 0.f;
- if (TeamNum == TEAM_CS_T)
- {
- if (IsVis)
- color = Color(32, 130, 43);
- else
- 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));
- }
- else
- {
- if (IsVis)
- color = Color(32, 130, 43);
- else
- 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));
- }
- return color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement