Controls::disableAllControlActions: Difference between revisions
MrPancakers (talk | contribs) No edit summary |
|||
| Line 1: | Line 1: | ||
{{ClientsideJsFunction}} | |||
Disables all controls within a given Input Group. | |||
==Syntax== | ==Syntax== | ||
< | <pre>mp.game.controls.disableAllControlActions(inputGroup);</pre> | ||
=== Required Arguments === | === Required Arguments === | ||
*'''inputGroup:''' | *'''inputGroup:''' {{RageType|Int}} ([[InputGroup|Input Groups]]) | ||
===Return value=== | ===Return value=== | ||
*'''Undefined''' | *'''Undefined''' | ||
==Example== | ==Example== | ||
< | 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: | ||
}); | }); | ||
</ | </pre> | ||
}} | |||
==See also== | ==See also== | ||
{{Controls_s_function_c}} | {{Controls_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 09:30, 14 January 2019
Client-Side Function
Disables all controls within a given Input Group.
Syntax
mp.game.controls.disableAllControlActions(inputGroup);
Required Arguments
- inputGroup: Int (Input Groups)
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);
});