Skip to content

common

The common namespace provides general environmental helpers for map names, voice states, and system time.


Function Returns Description
common.get_map_name() string Full map path (e.g. "maps/de_mirage.bsp").
common.get_map_shortname() string Short map name (e.g. "de_mirage").
common.is_recording_voice() boolean true if local microphone voice recording is active.
common.get_local_time() systime_t Structured local system time (year, month, day, hour, minute, second, millisecond).
common.get_unix_time() number Standard Unix epoch timestamp in seconds.

client.add_callback("render", function()
local time = common.get_local_time()
local time_str = string.format("%02d:%02d:%02d", time.hour, time.minute, time.second)
render.text(1, vector(10, 10), color(255, 255, 255), "o", time_str)
end)