Controls::disableAllControlActions: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(2 intermediate revisions by 2 users not shown)
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.
// todo
{{ClientsideCode|
</syntaxhighlight>
<pre>
mp.events.add('render', () => {
 
    if(condition) mp.game.controls.disableAllControlActions(2);
 
});
</pre>
}}
 
==See also==
==See also==
{{Controls_s_function_c}}
{{Controls_functions_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 10:54, 14 May 2024