Comments (3)
Is it possible to do this without hooking any game function ? @danielkrupinski
from goesp.
it is possible code you need
Config.h
ColorToggle bombTimer{ 1.0f, 0.55f, 0.0f };
on the GUI.cpp :
ImGuiCustom::colorPicker("Bomb timer", config->misc.bombTimer);
inside Misc.cpp
`void Misc::drawBombTimer() noexcept
{
if (config->misc.bombTimer.enabled) {
for (int i = interfaces->engine->getMaxClients(); i <= interfaces->entityList->getHighestEntityIndex(); i++) {
Entity* entity = interfaces->entityList->getEntity(i);
if (!entity || entity->isDormant() || entity->getClientClass()->classId != ClassId::PlantedC4 || !entity->c4Ticking())
continue;
constexpr unsigned font{ 0xc1 };
interfaces->surface->setTextFont(font);
interfaces->surface->setTextColor(255, 255, 255);
auto drawPositionY{ interfaces->surface->getScreenSize().second / 8 };
auto bombText{ (std::wstringstream{ } << L"Bomb on " << (!entity->c4BombSite() ? 'A' : 'B') << L" : " << std::fixed << std::showpoint << std::setprecision(3) << (std::max)(entity->c4BlowTime() - memory->globalVars->currenttime, 0.0f) << L" s").str() };
const auto bombTextX{ interfaces->surface->getScreenSize().first / 2 - static_cast<int>((interfaces->surface->getTextSize(font, bombText.c_str())).first / 2) };
interfaces->surface->setTextPosition(bombTextX, drawPositionY);
drawPositionY += interfaces->surface->getTextSize(font, bombText.c_str()).second;
interfaces->surface->printText(bombText.c_str());
const auto progressBarX{ interfaces->surface->getScreenSize().first / 3 };
const auto progressBarLength{ interfaces->surface->getScreenSize().first / 3 };
constexpr auto progressBarHeight{ 5 };
interfaces->surface->setDrawColor(50, 50, 50);
interfaces->surface->drawFilledRect(progressBarX - 3, drawPositionY + 2, progressBarX + progressBarLength + 3, drawPositionY + progressBarHeight + 8);
if (config->misc.bombTimer.rainbow)
interfaces->surface->setDrawColor(rainbowColor(memory->globalVars->realtime, config->misc.bombTimer.rainbowSpeed));
else
interfaces->surface->setDrawColor(config->misc.bombTimer.color);
static auto c4Timer = interfaces->cvar->findVar("mp_c4timer");
interfaces->surface->drawFilledRect(progressBarX, drawPositionY + 5, static_cast<int>(progressBarX + progressBarLength * std::clamp(entity->c4BlowTime() - memory->globalVars->currenttime, 0.0f, c4Timer->getFloat()) / c4Timer->getFloat()), drawPositionY + progressBarHeight + 5);
if (entity->c4Defuser() != -1) {
if (PlayerInfo playerInfo; interfaces->engine->getPlayerInfo(interfaces->entityList->getEntityFromHandle(entity->c4Defuser())->index(), playerInfo)) {
if (wchar_t name[128]; MultiByteToWideChar(CP_UTF8, 0, playerInfo.name, -1, name, 128)) {
drawPositionY += interfaces->surface->getTextSize(font, L" ").second;
const auto defusingText{ (std::wstringstream{ } << name << L" is defusing: " << std::fixed << std::showpoint << std::setprecision(3) << (std::max)(entity->c4DefuseCountDown() - memory->globalVars->currenttime, 0.0f) << L" s").str() };
interfaces->surface->setTextPosition((interfaces->surface->getScreenSize().first - interfaces->surface->getTextSize(font, defusingText.c_str()).first) / 2, drawPositionY);
interfaces->surface->printText(defusingText.c_str());
drawPositionY += interfaces->surface->getTextSize(font, L" ").second;
interfaces->surface->setDrawColor(50, 50, 50);
interfaces->surface->drawFilledRect(progressBarX - 3, drawPositionY + 2, progressBarX + progressBarLength + 3, drawPositionY + progressBarHeight + 8);
interfaces->surface->setDrawColor(0, 255, 0);
interfaces->surface->drawFilledRect(progressBarX, drawPositionY + 5, progressBarX + static_cast<int>(progressBarLength * (std::max)(entity->c4DefuseCountDown() - memory->globalVars->currenttime, 0.0f) / (interfaces->entityList->getEntityFromHandle(entity->c4Defuser())->hasDefuser() ? 5.0f : 10.0f)), drawPositionY + progressBarHeight + 5);
drawPositionY += interfaces->surface->getTextSize(font, L" ").second;
const wchar_t* canDefuseText;
if (entity->c4BlowTime() >= entity->c4DefuseCountDown()) {
canDefuseText = L"Can Defuse";
interfaces->surface->setTextColor(0, 255, 0);
} else {
canDefuseText = L"Cannot Defuse";
interfaces->surface->setTextColor(255, 0, 0);
}
interfaces->surface->setTextPosition((interfaces->surface->getScreenSize().first - interfaces->surface->getTextSize(font, canDefuseText).first) / 2, drawPositionY);
interfaces->surface->printText(canDefuseText);
}
}
}
break;
}
}
}`
hope this helps you a lot
from goesp.
Added (f233abf)
from goesp.
Related Issues (20)
- How to inject on windows? HOT 1
- Issue compiling on Ubuntu HOT 1
- Ctrl + B. What now? HOT 2
- make mac paste
- [Question] How is the rendering done? HOT 1
- Streamproof not work on Discord HOT 2
- feature request: motion blur
- [QUESTION] How shaders are built?
- Virustotal detects GOESP's dll as a definite virus, Windows Defender also does. I know this is open source but is this really virus-free? HOT 2
- GoESP doesn't work on matchmaking servers HOT 4
- Possible to rewrite GOESP with golang HOT 3
- Fails to Build on Arch Linux HOT 2
- Add missing items in DZ mode
- Auto Load CFG (config.txt)
- Cant select team HOT 2
- Can't select a team
- [linux] Does GOESP write game memory or just reads it?
- Crashes CS:GO upon injection under GNU/Linux HOT 2
- 2023 still undected?
- How to load after building on linux
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 goesp.