Lua · Examples
Grenades
The grenade in your hand and every grenade in the world.
Each snippet runs as-is: copy it, press From Clipboard on the Lua page, turn it on. Quick start
#Smoke timers
Labels on active smokes and fires.
grenades_1.lua
local white = color(235, 238, 245)
function on_frame()
for _, g in ipairs(nade.list()) do
if (g.type == "smoke" and g.deployed) or g.type == "inferno" then
local x, y, ok = draw.world_to_screen(g.pos.x, g.pos.y, g.pos.z + 40)
if ok then draw.text_outline(x - 12, y, g.type, white, 13) end
end
end
end#Where a flying grenade lands
landing and time_left exist while it is in the air.
grenades_2.lua
function on_frame()
for _, g in ipairs(nade.list()) do
if g.landing and not g.exploded then
draw.circle3d(g.landing, 30, color(255, 120, 60), 2)
end
end
endFull scripts
Complete scripts with a header and settings, ready to use or change.