SetAnalogControlState: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Created page with "__NOTOC__ {{Client function}} This sets the analog control state of a control. ==Syntax== <syntaxhighlight lang="lua"> bool setAnalogControlState ( string controlName , int state ) </syntaxhighlight> ===...")
 
Line 4: Line 4:


==Syntax==
==Syntax==
<syntaxhighlight lang="lua"> bool setAnalogControlState ( string controlName , int state ) </syntaxhighlight>
<syntaxhighlight lang="lua"> bool setAnalogControlState ( string controlName , float state ) </syntaxhighlight>
===Required Arguement===
===Required Arguement===
* '''controlName''': the control name. Here's a list:
* '''controlName''': the control name. Here's a list:
Line 21: Line 21:
**'''special_control_up'''
**'''special_control_up'''
**'''special_control_down'''
**'''special_control_down'''
* '''state''': a value between 0 and 1 indicating the amount the control is pressed.
* '''state''': a float between 0 and 1 indicating the amount the control is pressed.


===Returns===
===Returns===
Returns true, else false if invalid argument.  
Returns true, else false if invalid argument.


==See Also==
==See Also==
{{Client input functions}}
{{Client input functions}}

Revision as of 20:04, 31 August 2012

This sets the analog control state of a control.

Syntax

 bool setAnalogControlState ( string controlName , float state ) 

Required Arguement

  • controlName: the control name. Here's a list:
    • left
    • right
    • forwards
    • backwards
    • vehicle_left
    • vehicle_right
    • steer_forward
    • steer_back
    • accelerate
    • brake_reverse
    • special_control_left
    • special_control_right
    • special_control_up
    • special_control_down
  • state: a float between 0 and 1 indicating the amount the control is pressed.

Returns

Returns true, else false if invalid argument.

See Also