MIDDLE
Platinian
I tried to add esp functions to my cheat, but did not encounter a problem. When I try to take any method from the esp namespace itself, I get an error saying that the namespace does not exist, because the esp file is included.
Here is the ESPManager itself, in which there is an error:
Here is the esp.h with the ESP namespace:
Here is the compilation error:
Here is the ESPManager itself, in which there is an error:
C++:
#ifndef ZYGISK_ESPMANAGER_H
#define ZYGISK_ESPMANAGER_H
#include "ESP.h"
namespace ESPManager
{
std::vector<void *> players;
void arc(float x, float y, float radius, float min_angle, float max_angle, ImColor col, float thickness);
void void DrawSkeleton(void *player, ImColor color);
void Render()
{
if (espon)
{
clearPlayers();
for (int i = 0; i < players.size(); i++)
{
if (players[i])
{
void *player = players[i];
auto health = GetPlayerHealth(get_photon(player));
auto money = 0; // GetPlayerMoney(get_photon(player));
auto team = GetPlayerTeam(get_photon(player));
auto armor = 1; // GetPlayerArmor(get_photon(player));
if (health > 0 && team != GetPlayerTeam(me))
{
auto w2sC = world2screen_c(pos + Vector3(0, 0.9, 0), checker);
auto w2sTop = world2screen_i(pos + Vector3(0, 1.9, 0));
auto w2sBottom = world2screen_i(pos + Vector3(0, 0, 0));
auto pmtXtop = w2sTop.x;
auto pmtXbottom = w2sBottom.x;
if (w2sTop.x > w2sBottom.x)
{
pmtXtop = w2sBottom.x;
pmtXbottom = w2sTop.x;
}
auto ray = visiblechecker[player];
auto color = ray ? visibleCol : invisibleCol;
auto healthL = (float)health;
const auto hayasaka =
(clamp<float>(healthL, 25, 75) - 25.f) / 50.f;
auto hpcolor = ImColor(int(120 + 135 * (1 - hayasaka)),
int(50.f + 175.f * hayasaka), int(80));
auto minhpcolor = ImColor(int(120 + 135 * (1 - 0)),
int(50.f + 175.f * 0), int(80));
if (healthL > 100)
{
hpcolor = ImColor(100, 150, 255);
minhpcolor = ImColor(100, 150, 255);
}
healthL = clamp<float>(healthL, 0, 100);
if (outoffov && (ray || !visible))
{
if ((w2sC.x < 0 || w2sC.x > glWidth) ||
(w2sC.y < 0 || w2sC.y > glHeight) || !checker)
{
constexpr int maxpixels = 200;
int pixels = maxpixels;
ESP::arc(glWidth / 2, glHeight / 2, 226 + distance * 2,
angle - size,
angle + size,
ImColor(1.f, 1.f, 1.f, 1.f * opacity), 4.f);
if (oofvis)
{
ESP::arc(glWidth / 2, glHeight / 2,
220 + distance * 2, angle - size,
angle + size,
ray ? ImColor(0.1f, 1.0f, 0.1f, 0.5f * opacity)
: ImColor(1.0f, 0.1f, 0.1f, 0.5f * opacity),
1.5f);
C++:
#ifndef ZYCHEATS_ESP_H
#define ZYCHEATS_ESP_H
using namespace std;
extern int glHeight, glWidth;
#include "functions.h"
namespace ESP
{
void *get_boneget(void *player, uint64_t bonefield)
{
return *(void **)((uint64_t)get_bipedmap(player) + bonefield);
}
inline void arc(float x, float y, float radius, float min_angle, float max_angle, ImColor col, float thickness)
{
ImGui::GetBackgroundDrawList()->PathArcTo(ImVec2(x, y), radius, Deg2Rad * min_angle, Deg2Rad * max_angle, 32);
ImGui::GetBackgroundDrawList()->PathStroke(col, false, thickness);
}
void DrawSkeleton(void *player, ImColor color)
{
if (GetBones(player))
{
Code:
/main/cpp/ESPManager.h:228:33: error: use of undeclared identifier 'ESP'
ESP::arc(glWidth / 2, glHeight / 2, 226 + distance * 2,
^
/src/main/cpp/ESPManager.h:235:37: error: use of undeclared identifier 'ESP'
ESP::arc(glWidth / 2, glHeight / 2,
^
/src/main/cpp/ESPManager.h:281:33: error: use of undeclared identifier 'ESP'
ESP::DrawSkeleton(player, color);