isFlashed flag

- Added Player is flashed flag to show when a player is flashed
This commit is contained in:
ifBars
2023-10-24 00:06:29 -06:00
parent 1512e07281
commit 1bfbeaef91
4 changed files with 21 additions and 2 deletions
+16 -2
View File
@@ -74,8 +74,6 @@ namespace hack {
* (This could have been done by getting a entity list count from the engine, but I'm too lazy to do that)
**/
while (true) {
playerIndex++;
list_entry = process->read<uintptr_t>(entity_list + (8 * (playerIndex & 0x7FFF) >> 9) + 16);
if (!list_entry)
@@ -268,6 +266,22 @@ namespace hack {
10
);
float flashDuration = process->read<float>(pCSPlayerPawn + updater::offsets::m_flFlashDuration);
bool isFlashed;
if (flashDuration > 0.0)
isFlashed = true;
if (isFlashed)
{
render::RenderText(
g::hdcBuffer,
screenHead.x + (width / 2 + 5),
screenHead.y + 60,
"Player is flashed",
config::esp_distance_color,
10
);
}
std::string defuText = "Player is defusing";
if (isDefusing)