Skip to content

Time and connection

API Returns Notes
aqua.get_curtime() number Client curtime (seconds)
aqua.realtime() number Monotonic seconds. Keeps running in menus and across matches - use it for UI timing (fades, delays) that must not care about game state
aqua.script_dir() string Absolute path of this script’s folder
aqua.is_in_game() bool Signon full (in level / match) via engine client
aqua.is_connected() bool Connection handshake started (may not be fully in level yet)
aqua.server_address() string The address the status command prints as “udp/ip” ("a.b.c.d"), or "" when the network service did not resolve
aqua.is_official_server() bool True on a Valve dedicated server (C_CSGameRules::m_bIsValveDS); false on community/local servers and in the menu
aqua.rate_limit(id, intervalSec) bool true when intervalSec elapsed since last true for id (per script run). Resets if curtime goes backwards (new match).
aqua.once(id) bool true only the first time id is seen this script run
if aqua.rate_limit("heartbeat", 1.0) then
print("once per second")
end
if aqua.once("hello") then
print("startup message")
end