<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.svencoop.com/index.php?action=history&amp;feed=atom&amp;title=CCVar</id>
	<title>CCVar - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.svencoop.com/index.php?action=history&amp;feed=atom&amp;title=CCVar"/>
	<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=CCVar&amp;action=history"/>
	<updated>2026-04-24T19:45:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1183&amp;oldid=prev</id>
		<title>Outerbeast at 14:33, 6 March 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1183&amp;oldid=prev"/>
		<updated>2025-03-06T14:33:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:33, 6 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l75&quot;&gt;Line 75:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 75:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;void CVarCallback(CCVar@ cvar, const string&amp;amp; in szOldValue, float flOldValue)&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;void CVarCallback(CCVar@ cvar, const string&amp;amp; in szOldValue, float flOldValue)&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Called when the command is executed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Called when the command is executed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Scripting]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key svencoop_wiki-wiki_:diff:1.41:old-1182:rev-1183:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Outerbeast</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1182&amp;oldid=prev</id>
		<title>Outerbeast at 14:29, 6 March 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1182&amp;oldid=prev"/>
		<updated>2025-03-06T14:29:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:29, 6 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;CCVar&amp;lt;/code&amp;gt; class represents a custom server console variable.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;CCVar&amp;lt;/code&amp;gt; class represents a custom server console variable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;To create a custom cvar, it is done as follows:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;CCVar myCvar( &amp;lt;your cvar name&amp;gt;&quot;, &amp;lt;default value&amp;gt;, &quot;Description of the CVar goes here.&quot; );&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Using the cvar is done via:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;as_command &amp;lt;your cvar name&amp;gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This can be put in the CFG file or in the console.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Constructors ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Constructors ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key svencoop_wiki-wiki_:diff:1.41:old-1181:rev-1182:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Outerbeast</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1181&amp;oldid=prev</id>
		<title>Outerbeast: Created page with &quot;The &lt;code&gt;CCVar&lt;/code&gt; class represents a custom server console variable.  == Constructors == {| class=&quot;wikitable&quot; style=&quot;vertical-align:middle;&quot; |- style=&quot;font-weight:bold; t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=CCVar&amp;diff=1181&amp;oldid=prev"/>
		<updated>2025-03-06T14:24:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;lt;code&amp;gt;CCVar&amp;lt;/code&amp;gt; class represents a custom server console variable.  == Constructors == {| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot; |- style=&amp;quot;font-weight:bold; t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;lt;code&amp;gt;CCVar&amp;lt;/code&amp;gt; class represents a custom server console variable.&lt;br /&gt;
&lt;br /&gt;
== Constructors ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold; text-align:center;&amp;quot;&lt;br /&gt;
! Constructor&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CCVar(const string&amp;amp; in szName, float flValue = 0, const string&amp;amp; in szHelpInfo = &amp;quot;&amp;quot;, const ConCommandFlags_t flags = ConCommandFlag::None, CVarCallback@ pCallback = null)&lt;br /&gt;
| Creates a cvar with the given name, float value, help info, flags and callback.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;CCVar(const string&amp;amp; in szName, const string&amp;amp; in szValue, const string&amp;amp; in szHelpInfo = &amp;quot;&amp;quot;, const ConCommandFlags_t flags = ConCommandFlag::None, CVarCallback@ pCallback = null)&lt;br /&gt;
| Creates a cvar with the given name, string value, help info, flags and callback.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;vertical-align:middle;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight:bold; text-align:center;&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetName() const&lt;br /&gt;
| Gets the name of this command.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetFullyQualifiedName() const&lt;br /&gt;
| Gets the fully qualified name of this command. This is the name that the command is referred to when called.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetHelpInfo() const&lt;br /&gt;
| Gets the help info describing this command.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ConCommandKind::Type GetKind() const&lt;br /&gt;
| Gets the type of this console command.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetOwningModuleName() const&lt;br /&gt;
| Gets the name of the module that owns (created) this command.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bool HasBeenAdded() const&lt;br /&gt;
| Whether this command was added to the list of commands. Must be added to be usable from the console.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetDefaultValue() const&lt;br /&gt;
| Gets the default value for this cvar.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;const string&amp;amp; GetString() const&lt;br /&gt;
| Converts the value to a string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;float GetFloat() const&lt;br /&gt;
| Converts the value to a float.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;int GetInt() const&lt;br /&gt;
| Converts the value to an integer.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bool GetBool() const&lt;br /&gt;
| Converts the value to a boolean.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;void SetString(const string&amp;amp; in szValue)&lt;br /&gt;
| Sets the given string as the value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;void SetFloat(const float flValue)&lt;br /&gt;
| Sets the given float as the value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;void SetInt(const int iValue)&lt;br /&gt;
| Sets the given integer as the value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;void SetBool(const bool bValue)&lt;br /&gt;
| Sets the given boolean as the value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Funcdefs ==&lt;br /&gt;
&amp;lt;pre&amp;gt;void CVarCallback(CCVar@ cvar, const string&amp;amp; in szOldValue, float flOldValue)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Called when the command is executed.&lt;/div&gt;</summary>
		<author><name>Outerbeast</name></author>
	</entry>
</feed>