GithubHelp home page GithubHelp logo

base esp about csgo-cheat-base HOT 24 OPEN

designer1337 avatar designer1337 commented on May 24, 2024
base esp

from csgo-cheat-base.

Comments (24)

bruhmoment21 avatar bruhmoment21 commented on May 24, 2024 3

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.

pparadoxx avatar pparadoxx commented on May 24, 2024 1

nah i found it out, the cheat updated math.cpp so i'm using the older one

from csgo-cheat-base.

bruhmoment21 avatar bruhmoment21 commented on May 24, 2024
//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.

reaperpaster avatar reaperpaster commented on May 24, 2024

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.

reaperpaster avatar reaperpaster commented on May 24, 2024

nvm i found it in global vars im just not sure if works

from csgo-cheat-base.

designer1337 avatar designer1337 commented on May 24, 2024

It does
interfaces::globals->max_clients;

from csgo-cheat-base.

reaperpaster avatar reaperpaster commented on May 24, 2024

ok ty guys

from csgo-cheat-base.

danyrusdem avatar danyrusdem commented on May 24, 2024
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.

danyrusdem avatar danyrusdem commented on May 24, 2024
//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.

danyrusdem avatar danyrusdem commented on May 24, 2024
//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.

danyrusdem avatar danyrusdem commented on May 24, 2024
//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.

fartnuggets420 avatar fartnuggets420 commented on May 24, 2024

esp is crashing tryed debugging no info why

from csgo-cheat-base.

danyrusdem avatar danyrusdem commented on May 24, 2024

from csgo-cheat-base.

pparadoxx avatar pparadoxx commented on May 24, 2024

if (!(math::world_to_screen(vecHead, vecHeadScreen)))

this is giving me an error, why?

from csgo-cheat-base.

danyrusdem avatar danyrusdem commented on May 24, 2024

from csgo-cheat-base.

iraizo avatar iraizo commented on May 24, 2024

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.

danyrusdem avatar danyrusdem commented on May 24, 2024

from csgo-cheat-base.

iraizo avatar iraizo commented on May 24, 2024

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.

JerryBOT-CSGO avatar JerryBOT-CSGO commented on May 24, 2024

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.

iraizo avatar iraizo commented on May 24, 2024

@JerryBOT-CSGO what fucking solution; it has been answered already.

from csgo-cheat-base.

JerryBOT-CSGO avatar JerryBOT-CSGO commented on May 24, 2024

@JerryBOT-CSGO what fucking solution; it has been answered already.

for fucking retards koff koff @vibingdir

from csgo-cheat-base.

iraizo avatar iraizo commented on May 24, 2024

@JerryBOT-CSGO what fucking solution; it has been answered already.

for fucking retards koff koff @vibingdir

retards can still read.

from csgo-cheat-base.

vibingdir avatar vibingdir commented on May 24, 2024

@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.

iraizo avatar iraizo commented on May 24, 2024

no clue.

from csgo-cheat-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.