Skip to content

Engine methods

Current short map identifier, for example "de_nuke", copied from the engine. Returns nil outside a match or if unavailable. It is not a localized display name or a maps/...vpk path.

aqua.engine.exec(command) -> bool[, reason]

Section titled “aqua.engine.exec(command) -> bool[, reason]”

Queue a client console command through the engine’s unrestricted command path. true means accepted into the local queue; it does not confirm execution or server permission. The queue is pumped on the game thread after script callbacks, so calling this from on_draw does not execute game functions inside drawing.

Commands accept 1-1024 bytes without NUL. Quotes, semicolons and newlines retain their normal console meaning; no JavaScript escaping or Panorama panel is needed. Limits are 8 queued commands per script, 32 overall, and 8 accepted commands per second per script with burst 8. Stopping/erroring/unloading a script removes its pending commands. An already submitted engine command cannot be recalled.

Unrestricted concerns client command flags; server-side cheats/admin rules still apply. Unavailable bindings, invalid input or limits return false, reason.

local ok, reason = aqua.engine.exec("give weapon_ssg08")
if not ok then print(reason) end