Garry's Mod Wiki

Revision Difference

ConVar:SetFloat#528203

<function name="SetFloat" parent="ConVar" type="classfunc"> <description>Sets a ConVar's value to to the input number. This can only be ran on ConVars created from within Lua.</description>⤶ <description>Sets a ConVar's value to to the input number. <note>This can only be ran on ConVars created from within Lua.</note></description>⤶ <realm>Shared and Menu</realm> <args> <arg name="value" type="number">Value to set the ConVar to.</arg> </args> </function> <example> <description>Demonstrates the use of this function.</description> <code>local exmp = GetConVar ( "CVAR_EXAMPLE" )⤶ exmp:SetFloat(13.37)</code>⤶ </example>⤶ <code>⤶ local example = GetConVar( "CVAR_EXAMPLE" )⤶ example:SetFloat( 13.37 )⤶ </code>⤶ </example>