Lua · Variables · Features

nade

Grenades in the air, smokes, fires and the grenade in your hand.

FunctionWhat it does
nade.list()Grenades in the world. Same as entity.grenades().
nade.held()The predicted path of the grenade you are holding, or nil.

#nade.list

nade.list()

Grenades in the world. Same as entity.grenades().

Returns

table[]
See the grenade table below.

#nade.held

nade.held()

The predicted path of the grenade you are holding, or nil.

Returns

table | nil
type (smoke, flash, he, molotov, decoy), path (array of vectors), landing (vector), seconds (flight time).
  • Each call keeps the prediction running for 2 seconds, even when Grenade Prediction is off in the menu. Nothing is drawn for you; draw the path yourself.
Example
local h = nade.held()
if h then
    for i = 2, #h.path do draw.line3d(h.path[i - 1], h.path[i], white, 2) end
end

Grenade table

FieldTypeMeaning
typestringhe, flash, smoke, molotov, decoy or inferno (fire on the ground).
posvectorWhere it is now.
explodedboolean
deployedbooleanSmoke is out.
smoke_timernumberSmoke time.
thrown_fromvectorWhere it was thrown from, when known.
landingvectorPredicted landing spot while flying, when known.
time_leftnumberSeconds until it lands or pops, with landing.