Skip to content

Match and observer state

Copied current state, refreshed once per rendered game frame. It works when a script starts mid-match without reconstructing earlier events. Returns nil in the menu, after disconnect, or when the required state is unavailable. Editing the returned table does not change the game or the next result.

Field Meaning
mapName Short map identifier, also available through aqua.engine.get_map_name()
scoreT, scoreCT Current T/CT scores; absent if the respective team is unavailable
roundsPlayed, roundNumber Completed rounds and roundsPlayed + 1, matching the scoreboard convention
phase "warmup", "freeze", "live", "round_over", "halftime" or "over"
gamePhase Raw native phase number; distinct from the derived phase string
warmup, freeze, matchStarted Current native flags
halftime, matchOver Native halftime/match-ended phase flags
overtime Native overtime counter; 0 during regulation
roundTime, roundStartTime Configured round duration in seconds and start on the game’s clock
time Pause-adjusted game time in seconds; absent if its native function is unavailable
roundTimeRemaining Native round timer, absent during warmup or if unavailable; game modes can use sentinel values
phaseTimeRemaining Nonnegative current-phase countdown, or absent if no countdown is known
freezeTimeRemaining Freeze countdown only while phase == "freeze"; otherwise absent
roundWinStatus Raw native round-win status; 0 while undecided

Phase precedence follows the game: match ended, warmup, freeze, round over, halftime, then live. Flags remain native values, so consult phase for that precedence. matchStarted is independent and does not override the phase.

Freeze timing uses the upcoming round start and the engine’s pause-aware clock. Warmup without a scheduled end has no countdown. Halftime uses the native phase timer; round over uses the scheduled restart. These are client-reported values, not a promise that every server/game mode exposes a finite authoritative timer.

local rules = aqua.get_game_rules()
if rules and rules.freezeTimeRemaining then
print(string.format("Freeze: %.1fs", rules.freezeTimeRemaining))
end

The player the local client is following in-eye (mode=2) or chase (mode=3). Returns a copied identity table with index, handle, pawnHandle, steamId, name, team, isLocalPlayer and mode. SteamIDs are exact decimal strings, including "0" for bots. Match handle to get_players() if you need that player’s health, origin or other full player fields.

Returns nil while alive, roaming, disconnected, following a non-player camera, or when the target’s full handle is no longer valid. It follows the active camera pawn and does not reuse a dead player’s stale observer target after respawn.