Template:Varcom: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (added language bar.)
(-moved documentation to its own page)
Line 1: Line 1:
<noinclude>{{lang|{{FULLPAGENAME}}}}
<includeonly><onlyinclude>{{#switch:{{{1|{{style|color:#f00|'''VARIABLE NAME MISSING!'''}}}}} | start = <!--
</noinclude>{{#switch:{{{1|{{style|color:#f00|'''VARIABLE NAME MISSING!'''}}}}} | start = <!--
--><table class="wikitable"><!--
--><table class="wikitable"><!--
-----><tr><!--
-----><tr><!--
Line 15: Line 14:
-------------------->{{{3|}}}}}}}</strong></td><!--
-------------------->{{{3|}}}}}}}</strong></td><!--
--------><td>{{{4|{{todo|Effect description.}}}}}</td><!--
--------><td>{{{4|{{todo|Effect description.}}}}}</td><!--
-----></tr>}}<noinclude>
-----></tr>}}</includeonly></onlyinclude>
----
{{documentation}}
This template can be used for both console variables and console commands.
 
Parameters:
#Name of the variable or command.
##To generate the header, put <code>start</code> in this space.
##To finish the table, put <code>end</code>.
##If this is not defined, the text {{style|color:#f00|'''NAME MISSING!'''}} will appear and forcibly break the table formatting until it is fixed.
#Parameter(s) of the command, or for variables, the default value.
##Optional.
##Put <code>null</code> to display the text ''[blank by default]''.
#Descriptor for whatever is put in the last space.
##Optional.
##Put <code>01</code> to quickly indicate boolean convars.
##Similarly, use <code>dist</code> for [[Hammer units]].
#Effect of the command or variable.
##If undefined, a TODO will take its place.
 
<pre>
{{varcom|start}}
{{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|sv_cheats|0|01|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}}
{{varcom|setpos|x y <z optional>|coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}}
{{varcom|end}}
</pre>
{{varcom|start}}
{{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}}
{{varcom|sv_cheats|0|01|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}}
{{varcom|setpos|x y <z optional>|coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}}
{{varcom|end}}</noinclude>

Revision as of 13:21, 18 November 2022

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history

This template can be used for both console variables (var) and console commands (com).

Parameters

  1. Name of the variable or command.
    1. To generate the header, put start in this space.
    2. To finish the table, put end.
    3. If this is not defined, the text NAME MISSING! will appear and forcibly break the table formatting until it is fixed.
  2. Parameter(s) of the command, or for variables, the default value.
    1. Optional.
    2. Put null to display the text [blank by default].
  3. Descriptor for whatever is put in the last space.
    1. Optional.
    2. Put 01 to quickly indicate boolean convars.
    3. Similarly, use dist for Hammer units.
  4. Effect of the command or variable.
    1. If undefined, a TODO will take its place.

Examples

{{varcom|start}} {{varcom|noclip|||Makes player ignore gravity and all solidity. Useful for observing and debugging.}} {{varcom|sv_cheats|0|01|<code>1</code> enables cheats on the server, which disables achievement progress and enables many more console commands.}} {{varcom|setpos|x y <z optional>|coordinates|Puts the player at the coordinate triplet entered. If <code>z</code> is not specified, the player will maintain their current z position.}} {{varcom|end}}
ConVar/CommandParameters or default valueDescriptorEffect
noclipMakes player ignore gravity and all solidity. Useful for observing and debugging.
sv_cheats00 disables, 1 enables1 enables cheats on the server, which disables achievement progress and enables many more console commands.
setposx y <z optional>coordinatesPuts the player at the coordinate triplet entered. If z is not specified, the player will maintain their current z position.