Controls::disableAllControlActions: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 1: Line 1:
{{ClientsideJsFunction}}
Disables all controls within a given Input Group.


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.controls.disableAllControlActions(inputGroup);</syntaxhighlight>
<pre>mp.game.controls.disableAllControlActions(inputGroup);</pre>
 
=== Required Arguments ===
=== Required Arguments ===
*'''inputGroup:''' int
*'''inputGroup:''' {{RageType|Int}} ([[InputGroup|Input Groups]])
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
This disables all controls under the 'INPUTGROUP_WHEEL' input group, so any controls that fall under this input group will be disabled.
{{ClientsideCode|
<pre>
mp.events.add('render', () => {
mp.events.add('render', () => {


Line 13: Line 20:


});
});
</syntaxhighlight>
</pre>
}}


==See also==
==See also==
{{Controls_s_function_c}}
{{Controls_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Revision as of 09:30, 14 January 2019

Client-Side
Function

 JavaScript



Disables all controls within a given Input Group.

Syntax

mp.game.controls.disableAllControlActions(inputGroup);

Required Arguments

Return value

  • Undefined

Example

This disables all controls under the 'INPUTGROUP_WHEEL' input group, so any controls that fall under this input group will be disabled.

Client-Side
mp.events.add('render', () => {

    if(condition) mp.game.controls.disableAllControlActions(2);

});

See also

Template:Controls s function c