Пользователь
-
Автор темы
- #1
паста для базы csgosimple by MarkHC
SS:
Код:
void Visuals::Player::RenderBox()
{
if (g_Options.esp_player_boxes_types == 0)
{
g_VGuiSurface->DrawSetColor(esp_ctx.clr);
g_VGuiSurface->DrawOutlinedRect(esp_ctx.bbox.left, esp_ctx.bbox.top, esp_ctx.bbox.right, esp_ctx.bbox.bottom);
g_VGuiSurface->DrawSetColor(Color::Black);
g_VGuiSurface->DrawOutlinedRect(esp_ctx.bbox.left - 1, esp_ctx.bbox.top - 1, esp_ctx.bbox.right + 1, esp_ctx.bbox.bottom + 1);
g_VGuiSurface->DrawOutlinedRect(esp_ctx.bbox.left + 1, esp_ctx.bbox.top + 1, esp_ctx.bbox.right - 1, esp_ctx.bbox.bottom - 1);
}
else if (g_Options.esp_player_boxes_types == 1)
{
int x1, y1, x2, y2, w, h;
x1 = esp_ctx.bbox.left;
y1 = esp_ctx.bbox.top;
x2 = esp_ctx.bbox.right;
y2 = esp_ctx.bbox.bottom;
w = x2;
h = y2;
int Line_Size = (y1 - h) / 6;
int Line_Size2 = (y1 - h) / 6;
g_VGuiSurface->DrawSetColor(esp_ctx.clr);
//top inwards
g_VGuiSurface->DrawLine(w, y1, w + Line_Size, y1);
g_VGuiSurface->DrawLine(x1, y1, x1 - Line_Size, y1);
//top downwards
g_VGuiSurface->DrawLine(x1, y1, x1, y1 - Line_Size);
g_VGuiSurface->DrawLine(w, y1, w, y1 - Line_Size);
//bottom inwards
g_VGuiSurface->DrawLine(x1, h, x1 - Line_Size, h);
g_VGuiSurface->DrawLine(w, h, w + Line_Size, h);
//bottom upwards
g_VGuiSurface->DrawLine(x1, h, x1, h + Line_Size);
g_VGuiSurface->DrawLine(w, h, w, h + Line_Size);
//outlines
g_VGuiSurface->DrawSetColor(Color::Black);
//top inwards
g_VGuiSurface->DrawLine(w, y1 - 1, w + Line_Size, y1 - 1);
g_VGuiSurface->DrawLine(x1, y1 - 1, x1 - Line_Size, y1 - 1);
//inlines
g_VGuiSurface->DrawLine(w - 1, y1 + 1, w + Line_Size, y1 + 1);
g_VGuiSurface->DrawLine(x1 + 1, y1 + 1, x1 - Line_Size, y1 + 1);
// top downwards
g_VGuiSurface->DrawLine(x1 - 1, y1 - 1, x1 - 1, y1 - Line_Size);
g_VGuiSurface->DrawLine(w + 1, y1 - 1, w + 1, y1 - Line_Size);
//inlines
g_VGuiSurface->DrawLine(x1 + 1, y1, x1 + 1, y1 - Line_Size);
g_VGuiSurface->DrawLine(w - 1, y1, w - 1, y1 - Line_Size);
//bottom inwards
g_VGuiSurface->DrawLine(x1, h + 1, x1 - Line_Size, h + 1);
g_VGuiSurface->DrawLine(w, h + 1, w + Line_Size, h + 1);
//inlines
g_VGuiSurface->DrawLine(x1 + 1, h - 1, x1 - Line_Size, h - 1);
g_VGuiSurface->DrawLine(w - 1, h - 1, w + Line_Size, h - 1);
//bottom upwards
g_VGuiSurface->DrawLine(x1 - 1, h + 1, x1 - 1, h + Line_Size);
g_VGuiSurface->DrawLine(w + 1, h + 1, w + 1, h + Line_Size);
//inlines
g_VGuiSurface->DrawLine(x1 + 1, h, x1 + 1, h + Line_Size);
g_VGuiSurface->DrawLine(w - 1, h, w - 1, h + Line_Size);
}
else if (g_Options.esp_player_boxes_types == 2)
{
int iScreenWidth, iScreenHeight;
g_VGuiSurface->GetScreenSize(iScreenWidth, iScreenHeight);
ICollideable* coll = esp_ctx.pl->GetCollideable();
Vector min = coll->OBBMins() + esp_ctx.pl->m_vecOrigin();
Vector max = coll->OBBMaxs() + esp_ctx.pl->m_vecOrigin();
Vector corners[8] =
{
Vector(min.x,min.y,min.z),
Vector(min.x,max.y,min.z),
Vector(max.x,max.y,min.z),
Vector(max.x,min.y,min.z),
Vector(min.x,min.y,max.z),
Vector(min.x,max.y,max.z),
Vector(max.x,max.y,max.z),
Vector(max.x,min.y,max.z)
};
int edges[12][2] = { { 0, 1 },{ 1, 2 },{ 2, 3 },{ 3, 0 },{ 4, 5 },{ 5, 6 },{ 6, 7 },{ 7, 4 },{ 0, 4 },{ 1, 5 },{ 2, 6 },{ 3, 7 }, };
for (const auto edge : edges)
{
Vector p1, p2;
if (!Math::WorldToScreen(corners[edge[0]], p1) || !Math::WorldToScreen(corners[edge[1]], p2))
return;
g_VGuiSurface->DrawSetColor(esp_ctx.clr);
g_VGuiSurface->DrawLine(p1.x, p1.y, p2.x, p2.y);
}
}
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
Пожалуйста, авторизуйтесь для просмотра ссылки.
Последнее редактирование: