Lua · Variables · Features
nade
Grenades in the air, smokes, fires and the grenade in your hand.
| Function | What 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
endGrenade table
| Field | Type | Meaning |
|---|---|---|
type | string | he, flash, smoke, molotov, decoy or inferno (fire on the ground). |
pos | vector | Where it is now. |
exploded | boolean | |
deployed | boolean | Smoke is out. |
smoke_timer | number | Smoke time. |
thrown_from | vector | Where it was thrown from, when known. |
landing | vector | Predicted landing spot while flying, when known. |
time_left | number | Seconds until it lands or pops, with landing. |