So I didn't exactly figure out how to get the above stuff just yet but this code should help
Code:
----------- Variables
static int bombTime = 0;
static Stopwatch stopwatch = new Stopwatch();
----------- Main Code
int bombBase = ReadMemory<int>((int)g_pClient + Offsets.offsetList["dwGameRulesProxy"]);
bool BombPlanted = ReadMemory<bool>(bombBase + Offsets.offsetList["m_bBombPlanted"]);
int Local = ReadMemory<int>((int)g_pClient + Offsets.offsetList["dwLocalPlayer"]);
if (BombPlanted && !stopwatch.IsRunning)
{
stopwatch.Start();
}
else if (!BombPlanted)
{
Globals.bBombPlanted = false;
Globals.iTimeLeft = 0;
bombTime = 0;
stopwatch.Stop();
stopwatch.Reset();
}
if (BombPlanted && stopwatch.IsRunning && !M8) //M& is team checking
{
Globals.bBombPlanted = true;
bombTime = (int)stopwatch.ElapsedMilliseconds;
if (ReadMemory<bool>(Local + Offsets.offsetList["m_bHasDefuser"]) && bombTime < 35000)
{
Globals.iTimeLeft = 35000 - bombTime;
}
else if (bombTime < 30000)
{
Globals.iTimeLeft = 30000 - bombTime;
}
else
{
Globals.iTimeLeft = 0;
}
}
----------- Glow Code
bool defusing = ReadMemory<bool>(EntBase + Offsets.offsetList["m_bIsDefusing"]);
bool hasKit = ReadMemory<bool>(EntBase + Offsets.offsetList["m_bHasDefuser"]);
int iTime = Globals.iTimeLeft;
if (defusing)
{
if (hasKit)
{
iTime -= 5000;
if (iTime <= 0)
{
GlowObj.r = 1.0f;
GlowObj.g = 1.0f;
GlowObj.b = 1.0f;
}
else
{
GlowObj.r = 0f;
GlowObj.g = 0.5f;
GlowObj.b = 1.0f;
}
}
else
{
if (iTime <= 0)
{
GlowObj.r = 1f;
GlowObj.g = 1f;
GlowObj.b = 1f;
}
else
{
GlowObj.r = 0.5f;
GlowObj.g = 0f;
GlowObj.b = 1.0f;
}
}
If you guys have any questions. I will do my best to respond.