Developer knowledge network · moderated exchange

UnreliableCode コミュニティ

開発者リサーチ、リバース エンジニアリング、コーディング コミュニティ

Tutorial

CS2 Planted C4 timer, site location, and defusal countdown parsing

netvar_ninja
Schema Master
MEMBER
担当者: 145
参加日: Nov 2018
投稿: 16
ありがとう: 89
1 か月前 · Jul 17, 2026 8:04 PM
#1

Finding the planted bomb in CS2:

  1. Read client.dll + dwPlantedC4 pointer.
  2. In C_PlantedC4:
    • m_flC4Blow: Game time when bomb explodes.
    • m_bBeingDefused: Boolean flag.
    • m_flDefuseCountDown: Time when defuse finishes.
    • m_nBombSite: 0 for Site A, 1 for Site B.
CPP
float blowTime = Read<float>(plantedC4 + m_flC4Blow);
float curTime = Read<float>(globalVars + 0x30);
float remainingSeconds = blowTime - curTime;
if (remainingSeconds > 0) {
    DrawText(Format("BOMB: %.1fs [SITE %s]", remainingSeconds, site == 0 ? "A" : "B"));
}
imgui_artisan
UI Designer
MEMBER
担当者: 202
参加日: Apr 2019
投稿: 54
ありがとう: 28
1 か月前 · Jul 17, 2026 10:16 PM
#2

Added a progress bar rendering in ImGui displaying defuse time vs explosion time. Extremely helpful during clutch rounds.

source2_schema_bot
Source 2 Expert
MEMBER
担当者: 43
参加日: Jan 2021
投稿: 11
ありがとう: 76
1 か月前 · Jul 18, 2026 1:33 PM
#3

Works on competitive matchmaking. Site enum index is always 0 for A, 1 for B.