Lua · Variables · Features

bomb

The C4: planted, site, time left, defuse progress.

FunctionWhat 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))
end

Bomb table

FieldTypeMeaning
plantedboolean
defusedboolean
explodedboolean
defusingbooleanSomeone is defusing now.
sitestringA, B or empty.
time_leftnumberSeconds until it explodes.
timer_lengthnumberFull timer, usually 40.
defuse_leftnumberSeconds until the defuse ends, 0 when nobody defuses.
defuse_lengthnumber10 without a kit, 5 with one.
posvectorWhere it is. Missing when unknown.