ifCvar

NewJK / NewMod

Tests a cvar against conditions in order and executes the command belonging to the first match. Conditions support literal string equality; numeric $=, $!=, $>, $<, $>= and $<= comparisons; $contains; $beginswith/$startswith; $endswith; $else; and values read from another cvar with a leading $. The argument count includes the command itself.

At a glance

Field Value
Syntax ifCvar <cvar> <setting> <argument-count> <command...> [<setting> <argument-count> <command...> ...]
Cheat protected No
Network scope client-or-server: Engine code in both the client and the dedicated server; each uses its own value.
Category Engine & diagnostics
Module engine-shared
Renderer All / not renderer-specific
Derivation documented
Confidence high
Added 2022-04-20 in 1dd571383 (how to compare this against your build)
In-game xdocs No
In-game menu No

Arguments and gating

Arguments: cvar, setting, argument-count, command, ....

Provenance

Origin: NewJK / NewMod

Dated project introductions

Authored dates come from the exact registration’s first content commit, PR dates identify when work was proposed to each project, and integration dates come from each first-parent mainline. A project merging first does not override earlier upstream authorship or submission.

Project Authored PR opened Integrated Commit Relationship
TaystJK 2022-04-03 — 2022-04-20 1dd571383a0d Other project appearance
jaPRO 2022-04-03 — 2022-04-20 1dd571383a0d Other project appearance

Evidence

Generated from source commit c722804317d7 on 2026-09-28. Anything merged after that is not reflected here.