hanestv
Platinian
my esp works if not using fields.
but since im not using health value that detect player. when enemy changing state like shooting esp removed.
so i tried using fields with
private bool dead // 0x81
esp obejct and scaling is working perfectly.
so anyone can help my hooking determined the problem much appreciated.
thanks
bool dead(void *player) {
if (player != nullptr) {
return *(bool*)((uintptr_t)player + 0x81);
}
LOGI("Player is null, treating as dead");
return true; // If player is null, consider as dead
}
void Player_update(void *player) {
if (player != NULL) {
// Check if the player is dead
if (!dead(player)) {
// Player is alive, set the local scale and add to players list if not already present
void *transform = get_Transform(player);
if (transform) {
set_localscale(transform, {Scale, Scale, Scale}); // Adjust the scale
}
// Add to list if not already tracked
if (std::find(players.begin(), players.end(), player) == players.end()) {
players.push_back(player);
}
// Limit tracked players to a maximum of 8
if (players.size() > 8) {
players.erase(players.begin()); // Remove the oldest tracked player
}
} else {
// Player is dead, remove from the tracked list if necessary
players.erase(std::remove(players.begin(), players.end(), player), players.end());
}
}
old_Player_update(player); // Call the original update function
}
//ESP
if (Esp) {
auto camera = get_camera();
if (camera != NULL) {
for (int i = 0; i < players.size(); i++) {
void* Player = players;
// Draw ESP only for alive players
if (Player != NULL && !dead(Player)) {
but since im not using health value that detect player. when enemy changing state like shooting esp removed.
so i tried using fields with
private bool dead // 0x81
esp obejct and scaling is working perfectly.
so anyone can help my hooking determined the problem much appreciated.
thanks
bool dead(void *player) {
if (player != nullptr) {
return *(bool*)((uintptr_t)player + 0x81);
}
LOGI("Player is null, treating as dead");
return true; // If player is null, consider as dead
}
void Player_update(void *player) {
if (player != NULL) {
// Check if the player is dead
if (!dead(player)) {
// Player is alive, set the local scale and add to players list if not already present
void *transform = get_Transform(player);
if (transform) {
set_localscale(transform, {Scale, Scale, Scale}); // Adjust the scale
}
// Add to list if not already tracked
if (std::find(players.begin(), players.end(), player) == players.end()) {
players.push_back(player);
}
// Limit tracked players to a maximum of 8
if (players.size() > 8) {
players.erase(players.begin()); // Remove the oldest tracked player
}
} else {
// Player is dead, remove from the tracked list if necessary
players.erase(std::remove(players.begin(), players.end(), player), players.end());
}
}
old_Player_update(player); // Call the original update function
}
//ESP
if (Esp) {
auto camera = get_camera();
if (camera != NULL) {
for (int i = 0; i < players.size(); i++) {
void* Player = players;
// Draw ESP only for alive players
if (Player != NULL && !dead(Player)) {