Comments (24)
use csgo::local_player
instead of
auto* const local_player = static_cast<player_t*>(interfaces::entity_list->get_client_entity(interfaces::engine->get_local_player()));
from csgo-cheat-base.
nah i found it out, the cheat updated math.cpp so i'm using the older one
from csgo-cheat-base.
//esp.hpp
#pragma once
#include "../../../dependencies/common_includes.hpp"
namespace visuals
{
void run() noexcept;
void boxes(player_t* entity) noexcept;
}
struct box
{
int x, y, w, h;
box() = default;
box(const int x, const int y, const int w, const int h)
{
this->x = x;
this->y = y;
this->w = w;
this->h = h;
}
};
//esp.cpp
bool get_playerbox(player_t* ent, box& in)
{
vec3_t flb, brt, blb, frt, frb, brb, blt, flt;
const auto origin = ent->abs_origin();
const auto min = ent->collideable()->mins() + origin;
const auto max = ent->collideable()->maxs() + origin;
vec3_t points[] = {
vec3_t(min.x, min.y, min.z),
vec3_t(min.x, max.y, min.z),
vec3_t(max.x, max.y, min.z),
vec3_t(max.x, min.y, min.z),
vec3_t(max.x, max.y, max.z),
vec3_t(min.x, max.y, max.z),
vec3_t(min.x, min.y, max.z),
vec3_t(max.x, min.y, max.z)
};
if (!interfaces::debug_overlay->world_to_screen(points[3], flb) || !interfaces::debug_overlay->world_to_screen(points[5], brt)
|| !interfaces::debug_overlay->world_to_screen(points[0], blb) || !interfaces::debug_overlay->world_to_screen(points[4], frt)
|| !interfaces::debug_overlay->world_to_screen(points[2], frb) || !interfaces::debug_overlay->world_to_screen(points[1], brb)
|| !interfaces::debug_overlay->world_to_screen(points[6], blt) || !interfaces::debug_overlay->world_to_screen(points[7], flt))
return false;
vec3_t arr[] = { flb, brt, blb, frt, frb, brb, blt, flt };
float left = flb.x;
float top = flb.y;
float right = flb.x;
float bottom = flb.y;
for (int i = 1; i < 8; ++i)
{
if (left > arr[i].x)
left = arr[i].x;
if (bottom < arr[i].y)
bottom = arr[i].y;
if (right < arr[i].x)
right = arr[i].x;
if (top > arr[i].y)
top = arr[i].y;
}
in.x = static_cast<int>(left);
in.y = static_cast<int>(top);
in.w = static_cast<int>(right - left);
in.h = static_cast<int>(bottom - top);
return true;
}
const color history{ 255, 255, 255,50 };
const color history_outline{ 0,0,0,60 };
void visuals::run() noexcept
{
for (int i = 1; i <= interfaces::engine->max_clients(); ++i)
{
auto* const entity = static_cast<player_t*>(interfaces::entity_list->get_client_entity(i));
if (!entity || !csgo::local_player || entity == csgo::local_player || entity->health() <= 0 /*|| entity->dormant()*/) continue;
if (!cfg_sys.sets.teammates && entity->team() == csgo::local_player->team()) continue;
boxes(entity);
}
}
void visuals::boxes(player_t* entity) noexcept
{
box bbox;
if (!cfg_sys.sets.boxes || !get_playerbox(entity, bbox)) return;
render::rect(bbox.x, bbox.y, bbox.w, bbox.h, entity->dormant() ? history : cfg_sys.sets.boxes_color);
render::rect(bbox.x + 1, bbox.y + 1, bbox.w - 2, bbox.h - 2, entity->dormant() ? history_outline : color(0, 0, 0));
render::rect(bbox.x - 1, bbox.y - 1, bbox.w + 2, bbox.h + 2, entity->dormant() ? history_outline : color(0, 0, 0));
}
//this is in paint traverse. hooks.cpp
case fnv::hash("MatSystemTopPanel"): {
if (interfaces::engine->is_in_game() && interfaces::engine->is_connected()) // make these
visuals::run(); // 2 lines first
// rest of the code
break;
}
from csgo-cheat-base.
thank you, one more thing:
the sdk doesn't have the max_clients() thing I think, I don't found it at least
from csgo-cheat-base.
nvm i found it in global vars im just not sure if works
from csgo-cheat-base.
It does
interfaces::globals->max_clients;
from csgo-cheat-base.
ok ty guys
from csgo-cheat-base.
void visuals::healthesp()
{
if (!variables::healthesp)
return;
if (!interfaces::engine->is_connected() || !interfaces::engine->is_in_game())
return;
if (!csgo::local_player)
return;
for (int iPlayer = 0; iPlayer < interfaces::globals->max_clients; iPlayer++)
{
auto pCSPlayer = reinterpret_cast<player_t*>(interfaces::entity_list->get_client_entity(iPlayer));
if (!pCSPlayer)
continue;
if (pCSPlayer == csgo::local_player)
continue;
if (pCSPlayer->dormant())
continue;
if (!(pCSPlayer->is_alive() && pCSPlayer->health() > 0))
continue;
vec3_t vecFoot, vecScreen, vecHeadScreen;
vecFoot = pCSPlayer->origin();
if (!(math::world_to_screen(vecFoot, vecScreen)))
continue;
vecFoot.z += 72.f;
if (!(math::world_to_screen(vecFoot, vecHeadScreen)))
continue;
auto health = pCSPlayer->health();
int h = vecScreen.y - vecHeadScreen.y;
//render::draw_text_string(10, 20, render::fonts::watermark_font, std::to_string(h), true, color::red());
int healthheight = (h * health) / 100;
int w = 4;
int y = vecHeadScreen.y;
int x = vecHeadScreen.x - (h / 4 + 5);
if (pCSPlayer->team() == csgo::local_player->team() && variables::showteamesp)
{
render::draw_rect(x, y, w, h, color::black());
render::draw_filled_rect(x + 1, y + 1, w - 1, healthheight - 2, color::green());
}
else if (pCSPlayer->team() != csgo::local_player->team())
{
render::draw_rect(x, y, w, h, color::black());
render::draw_filled_rect(x + 1, y + 1, w - 1, healthheight - 2, color::green());
}
}
}
from csgo-cheat-base.
//armorbar
void visuals::armoresp()
{
if (!variables::armoresp)
return;
if (!interfaces::engine->is_connected() || !interfaces::engine->is_in_game())
return;
if (!csgo::local_player)
return;
for (int iPlayer = 0; iPlayer < interfaces::globals->max_clients; iPlayer++)
{
auto pCSPlayer = reinterpret_cast<player_t*>(interfaces::entity_list->get_client_entity(iPlayer));
if (!pCSPlayer)
continue;
if (pCSPlayer == csgo::local_player)
continue;
if (pCSPlayer->dormant())
continue;
if (!(pCSPlayer->is_alive() && pCSPlayer->health() > 0))
continue;
vec3_t vecFoot, vecScreen, vecHeadScreen;
vecFoot = pCSPlayer->origin();
if (!(math::world_to_screen(vecFoot, vecScreen)))
continue;
vecFoot.z += 72.f;
if (!(math::world_to_screen(vecFoot, vecHeadScreen)))
continue;
auto armor = pCSPlayer->armor();
int h = vecScreen.y - vecHeadScreen.y;
//render::draw_text_string(10, 20, render::fonts::watermark_font, std::to_string(h), true, color::red());
int healthheight = (h * armor) / 100;
int w = 4;
int y = vecHeadScreen.y;
int x = vecHeadScreen.x + (h / 4);
if (pCSPlayer->team() == csgo::local_player->team() && variables::showteamesp)
{
render::draw_rect(x, y, w, h, color::black());
render::draw_filled_rect(x + 1, y + 1, w - 1, healthheight - 2, color::blue());
}
else if (pCSPlayer->team() != csgo::local_player->team())
{
render::draw_rect(x, y, w, h, color::black());
render::draw_filled_rect(x + 1, y + 1, w - 1, healthheight - 2, color::blue());
}
}
}
from csgo-cheat-base.
//bone esp
void visuals::boneesp()
{
if (!variables::boneesp)
return;
if (!interfaces::engine->is_connected() || !interfaces::engine->is_in_game())
return;
if (!csgo::local_player)
return;
for (int iPlayer = 0; iPlayer < interfaces::globals->max_clients; iPlayer++)
{
auto pCSPlayer = reinterpret_cast<player_t*>(interfaces::entity_list->get_client_entity(iPlayer));
if (!pCSPlayer)
continue;
if (pCSPlayer == csgo::local_player)
continue;
if (pCSPlayer->dormant())
continue;
if (!(pCSPlayer->is_alive() && pCSPlayer->health() > 0))
continue;
auto pStudioModel = interfaces::model_info->get_studio_model(pCSPlayer->model());
if (!pStudioModel)
return;
static matrix_t pBoneToWorldOut[128];
if (pCSPlayer->setup_bones(pBoneToWorldOut, 128, 256, 0))
{
for (int i = 0; i < pStudioModel->bones_count; i++)
{
studio_bone_t* pBone = pStudioModel->bone(i);
if (!pBone || !(pBone->flags & 256) || pBone->parent == -1)
continue;
vec3_t vBonePos1;
if (!math::world_to_screen(vec3_t(pBoneToWorldOut[i][0][3], pBoneToWorldOut[i][1][3], pBoneToWorldOut[i][2][3]), vBonePos1))
continue;
vec3_t vBonePos2;
if (!math::world_to_screen(vec3_t(pBoneToWorldOut[pBone->parent][0][3], pBoneToWorldOut[pBone->parent][1][3], pBoneToWorldOut[pBone->parent][2][3]), vBonePos2))
continue;
if (pCSPlayer->team() == csgo::local_player->team() && variables::showteamesp)
{
render::draw_line(vBonePos1.x, vBonePos1.y, vBonePos2.x, vBonePos2.y, color::white());
}
else if (pCSPlayer->team() != csgo::local_player->team())
{
render::draw_line(vBonePos1.x, vBonePos1.y, vBonePos2.x, vBonePos2.y, color::white());
}
}
}
}
}
from csgo-cheat-base.
//nameesp
void visuals::nameesp()
{
if (!variables::nameesp)
return;
if (!interfaces::engine->is_connected() || !interfaces::engine->is_in_game())
return;
if (!csgo::local_player)
return;
for (int iPlayer = 0; iPlayer < interfaces::globals->max_clients; iPlayer++)
{
auto pCSPlayer = reinterpret_cast<player_t*>(interfaces::entity_list->get_client_entity(iPlayer));
if (!pCSPlayer)
continue;
if (pCSPlayer == csgo::local_player)
continue;
if (pCSPlayer->dormant())
continue;
if (!(pCSPlayer->is_alive() && pCSPlayer->health() > 0))
continue;
vec3_t vecHead, vecHeadScreen;
vecHead = pCSPlayer->get_bone_position(8);
vecHead.z += 20.f;
if (!(math::world_to_screen(vecHead, vecHeadScreen)))
continue;
player_info_t playerinfo;
interfaces::engine->get_player_info(iPlayer, &playerinfo);
if (pCSPlayer->team() == csgo::local_player->team() && variables::showteamesp)
{
render::text(vecHeadScreen.x, vecHeadScreen.y, render::fonts::watermark_font, playerinfo.name, true, color::blue());
}
else if (pCSPlayer->team() != csgo::local_player->team())
{
render::text(vecHeadScreen.x, vecHeadScreen.y, render::fonts::watermark_font, playerinfo.name, true, color::red());
}
}
}
from csgo-cheat-base.
esp is crashing tryed debugging no info why
from csgo-cheat-base.
from csgo-cheat-base.
if (!(math::world_to_screen(vecHead, vecHeadScreen)))
this is giving me an error, why?
from csgo-cheat-base.
from csgo-cheat-base.
if (!(math::world_to_screen(vecHead, vecHeadScreen)))
this is giving me an error, why?
it would be helpful saying which error
from csgo-cheat-base.
from csgo-cheat-base.
I don't know why u have error,maybe u have another world2screen or anything else вс, 27 сент. 2020 г., 00:02 raizo [email protected]:
…
if (!(math::world_to_screen(vecHead, vecHeadScreen))) this is giving me an error, why? it would be helpful saying which error — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#46 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7NEATBR4I7UO2YOR52PALSHZJEXANCNFSM4OITBDUQ .
why even comment in the first place if you dont know what the issue is
from csgo-cheat-base.
For people who want thee solution :
bool math::world_to_screen(const vec3_t & origin, vec3_t & screen) {
- math.cpp
bool world_to_screen(const vec3_t& origin, vec3_t& screen);
- math.hpp
or just spend time here learncpp.com :)
from csgo-cheat-base.
@JerryBOT-CSGO what fucking solution; it has been answered already.
from csgo-cheat-base.
@JerryBOT-CSGO what fucking solution; it has been answered already.
for fucking retards koff koff @vibingdir
from csgo-cheat-base.
@JerryBOT-CSGO what fucking solution; it has been answered already.
for fucking retards koff koff @vibingdir
retards can still read.
from csgo-cheat-base.
@JerryBOT-CSGO what fucking solution; it has been answered already.
for fucking retards koff koff @vibingdir
?? I haven’t been in this conversation in months why am I being tagged
from csgo-cheat-base.
no clue.
from csgo-cheat-base.
Related Issues (20)
- material->create_material not present. HOT 1
- [pasta friendly] nice combobox & multicombobox for your pHack HOT 3
- color picker for your shitty hack HOT 4
- Weird CPP Thing
- help with glow esp HOT 1
- crashing HOT 1
- chams HOT 3
- hitsound/killsounds HOT 2
- all the text is gone after i change resolution HOT 14
- having weird errors which i cant figure out HOT 1
- Skinchanger help HOT 2
- Cant inject while not in -insecure HOT 2
- cant join team in a game HOT 11
- draw gradient? HOT 1
- Cant do anything when cs in window HOT 3
- Help HOT 3
- How would I add ImGui? HOT 2
- How to uninstall hook ? HOT 1
- how would i increase the size of the whole menu ? HOT 1
- Unable to join a team ingame HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csgo-cheat-base.