Lua · Variables · Features
bomb
The C4: planted, site, time left, defuse progress.
| Function | What it does |
|---|---|
bomb.state() | Everything about the bomb. Same as entity.c4(). |
#bomb.state
bomb.state()Everything about the bomb. Same as entity.c4().
Returns
table
See the table below.
Example
local b = bomb.state()
if b.planted and not b.defused then
print(b.site, string.format("%.1f", b.time_left))
endBomb table
| Field | Type | Meaning |
|---|---|---|
planted | boolean | |
defused | boolean | |
exploded | boolean | |
defusing | boolean | Someone is defusing now. |
site | string | A, B or empty. |
time_left | number | Seconds until it explodes. |
timer_length | number | Full timer, usually 40. |
defuse_left | number | Seconds until the defuse ends, 0 when nobody defuses. |
defuse_length | number | 10 without a kit, 5 with one. |
pos | vector | Where it is. Missing when unknown. |