<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LosFaul</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LosFaul"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/LosFaul"/>
	<updated>2026-04-26T10:25:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedDoingGangDriveby&amp;diff=69698</id>
		<title>SetPedDoingGangDriveby</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedDoingGangDriveby&amp;diff=69698"/>
		<updated>2021-03-26T22:43:29Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the driveby state of a ped.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedDoingGangDriveby ( ped thePed, bool state )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] element whose state is to be changed.&lt;br /&gt;
*'''state:''' A [[boolean]] value representing the drive-by state, ''true'' meaning enabled and ''false'' disabled.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the driveby state could be changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example turns on driveby mode when the local player types ''driveby'' in the console.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function setDoingDriveby()&lt;br /&gt;
        -- we check if local player isn't currently doing a gang driveby&lt;br /&gt;
        if not isPedDoingGangDriveby(localPlayer) then&lt;br /&gt;
                -- if he got driveby mode off, turn it on&lt;br /&gt;
                setPedWeaponSlot(localPlayer, 4)&lt;br /&gt;
                setPedDoingGangDriveby(localPlayer, true)&lt;br /&gt;
        else&lt;br /&gt;
                -- otherwise, turn it off&lt;br /&gt;
                setPedWeaponSlot(localPlayer, 0)&lt;br /&gt;
                setPedDoingGangDriveby(localPlayer, false)&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;driveby&amp;quot;, setDoingDriveby)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;br /&gt;
[[ru:setPedDoingGangDriveby]]&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedDoingGangDriveby&amp;diff=69697</id>
		<title>SetPedDoingGangDriveby</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedDoingGangDriveby&amp;diff=69697"/>
		<updated>2021-03-26T22:42:17Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the driveby state of a ped.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setPedDoingGangDriveby ( ped thePed, bool state )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePed:''' The [[ped]] element whose state is to be changed.&lt;br /&gt;
*'''state:''' A [[boolean]] value representing the drive-by state, ''true'' meaning enabled and ''false'' disabled.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the driveby state could be changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example turns on driveby mode when the local player types ''driveby'' in the console.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function setDoingDriveby()&lt;br /&gt;
        -- we check if local player isn't currently doing a gang driveby&lt;br /&gt;
        if not isPedDoingGangDriveby(localPlayer) then&lt;br /&gt;
                -- if he got driveby mode off, turn it on&lt;br /&gt;
                setPedWeaponSlot(localPlayer, 4 )&lt;br /&gt;
                setPedDoingGangDriveby(localPlayer, true)&lt;br /&gt;
        else&lt;br /&gt;
                -- otherwise, turn it off&lt;br /&gt;
                setPedWeaponSlot(localPlayer, 0)&lt;br /&gt;
                setPedDoingGangDriveby(localPlayer, false)&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;driveby&amp;quot;, setDoingDriveby)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;br /&gt;
[[ru:setPedDoingGangDriveby]]&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleWheelFrictionState&amp;diff=69621</id>
		<title>GetVehicleWheelFrictionState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleWheelFrictionState&amp;diff=69621"/>
		<updated>2021-03-11T18:22:40Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{New feature/item|3.0160|1.5.8|20726|This function returns the current wheel friction state of the [[vehicle]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getVehicleWheelFrictionState ( vehicle theVehicle, int wheel )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{OOP||[[vehicle]]:getWheelFrictionState}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] that you wish to get the wheel friction state.&lt;br /&gt;
*'''wheel:''' The wheel you want to check. (0: front left, 1: rear left, 2: front right, 3: rear right)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[int]] indicating the wheel friction state. This value can be:&lt;br /&gt;
&lt;br /&gt;
* '''0:''' Normal friction&lt;br /&gt;
* '''1:''' Slip with acceleration (only for driving wheels)&lt;br /&gt;
* '''2:''' Slip without acceleration&lt;br /&gt;
* '''3:''' Locked wheel (on brake or handbrake).&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example will show the friction state of each wheel of the player's current vehicle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler('onClientRender', root, function()&lt;br /&gt;
    local veh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
    &lt;br /&gt;
    if (not veh) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    dxDrawRectangle(0, 0, 300, 140, tocolor(0, 0, 0, 150))&lt;br /&gt;
    dxDrawText('FRICTION FRONT LEFT = ' .. getVehicleWheelFrictionState(veh, 0), 8, 10, 290, 40, tocolor(255, 255, 255), 1.5)&lt;br /&gt;
    dxDrawText('FRICTION FRONT RIGHT = ' .. getVehicleWheelFrictionState(veh, 2), 8, 40, 290, 70, tocolor(255, 255, 255), 1.5)&lt;br /&gt;
    dxDrawText('FRICTION REAR LEFT = ' .. getVehicleWheelFrictionState(veh, 1), 8, 70, 290, 100, tocolor(255, 255, 255), 1.5)&lt;br /&gt;
    dxDrawText('FRICTION REAR RIGHT = ' .. getVehicleWheelFrictionState(veh, 3), 8, 100, 290, 130, tocolor(255, 255, 255), 1.5)&lt;br /&gt;
&lt;br /&gt;
end)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client vehicle functions}}&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=68035</id>
		<title>SetAnalogControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=68035"/>
		<updated>2020-12-13T18:02:37Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This sets the analog control state of a control for the local player.&lt;br /&gt;
&lt;br /&gt;
To change the analog controls for a [[ped]], please use [[setPedAnalogControlState]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setAnalogControlState ( string control [, float state, bool forceOverrideNextFrame = false ] ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''control:''' The control that you want to set the state of. See [[control names]] for a list of possible controls.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''state:''' A [[float]] between 0 and 1 indicating the amount the control is pressed. If no value is provided, the analog control is removed.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{New feature/item|3.0300|1.5.8|20756|&lt;br /&gt;
*'''forceOverrideNextFrame: ''' A [[bool]] indicating if the player input should force fully overriden for the next frame.&lt;br /&gt;
}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the control state was successfully set, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This creates an ''/forwards'' command, which toggles your ''forwards'' control state between 0 and 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;forwards&amp;quot;,&lt;br /&gt;
    function( )&lt;br /&gt;
        if ( getAnalogControlState( &amp;quot;forwards&amp;quot; ) == 0 ) then&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 1 )&lt;br /&gt;
        else&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 0 )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script invertes left and right vehicle steering for the player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root,&lt;br /&gt;
    function()&lt;br /&gt;
        local right = getAnalogControlState(&amp;quot;vehicle_right&amp;quot;, true)&lt;br /&gt;
        local left = getAnalogControlState(&amp;quot;vehicle_left&amp;quot;, true)&lt;br /&gt;
        &lt;br /&gt;
        if right &amp;gt; left then&lt;br /&gt;
            setAnalogControlState(&amp;quot;vehicle_left&amp;quot;, right, true)&lt;br /&gt;
        else&lt;br /&gt;
            setAnalogControlState(&amp;quot;vehicle_right&amp;quot;, left, true)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client input functions}}&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=68034</id>
		<title>SetAnalogControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetAnalogControlState&amp;diff=68034"/>
		<updated>2020-12-13T17:59:13Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This sets the analog control state of a control for the local player.&lt;br /&gt;
&lt;br /&gt;
To change the analog controls for a [[ped]], please use [[setPedAnalogControlState]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setAnalogControlState ( string control [, float state, bool forceOverrideNextFrame = false ] ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''control:''' The control that you want to set the state of. See [[control names]] for a list of possible controls.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''state:''' A [[float]] between 0 and 1 indicating the amount the control is pressed. If no value is provided, the analog control is removed.&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{New feature/item|3.0300|1.5.8|20756|&lt;br /&gt;
*'''forceOverrideNextFrame: ''' A [[bool]] indicating if the player input should force fully overriden for the next frame.&lt;br /&gt;
}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the control state was successfully set, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This creates an ''/forwards'' command, which toggles your ''forwards'' control state between 0 and 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;forwards&amp;quot;,&lt;br /&gt;
    function( )&lt;br /&gt;
        if ( getAnalogControlState( &amp;quot;forwards&amp;quot; ) == 0 ) then&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 1 )&lt;br /&gt;
        else&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 0 )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client input functions}}&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPedAnalogControlState&amp;diff=67774</id>
		<title>GetPedAnalogControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPedAnalogControlState&amp;diff=67774"/>
		<updated>2020-11-21T11:57:11Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
This function retrieves the analog control state of a ped, as set by [[setPedAnalogControlState]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getPedAnalogControlState ( ped thePed, string controlName [, bool rawValue ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' The ped you wish to retrieve the control state of.&lt;br /&gt;
*'''controlName:''' The control. See [[control names]] for a list of possible controls.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{New feature/item|3.0160|1.5.7|20383|&lt;br /&gt;
*'''rawValue:''' A bool indicating if it should return the raw player input value (will always return script value for non-player peds).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a float between 0 ( full release ) and 1 ( full push ) indicating the amount the control is pushed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
x, y, z = getElementPosition(localPlayer)&lt;br /&gt;
rotX, rotY, rotZ = getElementRotation(localPlayer)&lt;br /&gt;
CJ = createPed(0, x, y, z)&lt;br /&gt;
CJ2 = createPed(0, x, y, z)&lt;br /&gt;
copcar = createVehicle(597, x, y+5, z+2)&lt;br /&gt;
copcar2 = createVehicle(597, x+2, y+10, z+4)&lt;br /&gt;
warpPedIntoVehicle(CJ2, copcar2, 0)&lt;br /&gt;
warpPedIntoVehicle(CJ, copcar, 0)&lt;br /&gt;
&lt;br /&gt;
function onGetCJAnalogControlState()&lt;br /&gt;
setPedAnalogControlState(CJ, &amp;quot;accelerate&amp;quot;, 0.90)&lt;br /&gt;
if getPedAnalogControlState(CJ, &amp;quot;accelerate&amp;quot;, 0.90) then&lt;br /&gt;
setPedAnalogControlState(CJ2, &amp;quot;brake_reverse&amp;quot;, 0.90)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), onGetCJAnalogControlState)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This example was created by '''Hydra'''.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04185|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:getPedAnalogControlState]]&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetAnalogControlState&amp;diff=67773</id>
		<title>GetAnalogControlState</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetAnalogControlState&amp;diff=67773"/>
		<updated>2020-11-21T11:56:23Z</updated>

		<summary type="html">&lt;p&gt;LosFaul: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This retrieves the analog control state of a control.  This is useful for detecting sensitive controls, such as those used on a joypad.&lt;br /&gt;
&lt;br /&gt;
To get the analog control state for a [[ped]], please use [[getPedAnalogControlState]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float getAnalogControlState ( string control [, bool rawValue ] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''control:''' The control that you want to get the state of. See [[control names]] for a list of possible controls.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{New feature/item|3.0157|1.5.7|20383|&lt;br /&gt;
*'''rawValue:''' A bool indicating if it should return the raw player input value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[float]] between 0 and 1 indicating the amount the control is pressed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This creates an ''/forwards'' command, which toggles your ''forwards'' control state between 0 and 1.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;forwards&amp;quot;,&lt;br /&gt;
    function( )&lt;br /&gt;
        if ( getAnalogControlState( &amp;quot;forwards&amp;quot; ) == 0 ) then&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 1 )&lt;br /&gt;
        else&lt;br /&gt;
            setAnalogControlState( &amp;quot;forwards&amp;quot;, 0 )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client input functions}}&lt;/div&gt;</summary>
		<author><name>LosFaul</name></author>
	</entry>
</feed>