| Function | Returns | Description |
|---|---|---|
game.map() | string | Current map name |
game.in_menu() | bool | In main menu |
game.warmup() | bool | Warmup active |
game.freeze_time() | bool | Freeze time active |
game.bomb_planted() | bool | Bomb planted |
game.rounds_played() | number | Total rounds played |
game.round_time_left() | number? | Seconds left in round, or nil |
game.match_started() | bool | Match has started |
Example
events.on('paint', function()
if game.warmup() then
render.text(10, 10, color(255, 200, 50), 'Warmup', 's')
end
local time = game.round_time_left()
if time and time < 10 then
render.text(10, 30, color(255, 50, 50), string.format('%.1fs', time), 's')
end
end)