Controls::disableAllControlActions: Difference between revisions
(yay) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| 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', () => { | |||
if(condition) mp.game.controls.disableAllControlActions(2); | |||
}); | |||
</pre> | |||
}} | |||
==See also== | ==See also== | ||
{{ | {{Controls_functions_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Latest revision as of 10:54, 14 May 2024
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);
});
See also
- mp.game.controls.disableAllControlActions
- mp.game.controls.disableControlAction
- mp.game.controls.enableAllControlActions
- mp.game.controls.enableControlAction
- mp.game.controls.getControlActionName
- mp.game.controls.getControlValue
- mp.game.controls.getControlNormal
- mp.game.controls.getDisabledControlNormal
- mp.game.controls.isControlEnabled
- mp.game.controls.isControlJustReleased
- mp.game.controls.isControlJustPressed
- mp.game.controls.isControlPressed
- mp.game.controls.isControlReleased
- mp.game.controls.isDisabledControlJustReleased
- mp.game.controls.isDisabledControlJustPressed
- mp.game.controls.isDisabledControlPressed
- mp.game.controls.isInputDisabled
- mp.game.controls.isInputJustDisabled
- mp.game.controls.setControlNormal
- mp.game.controls.setInputExclusive
- mp.game.controls.setPadShake
- mp.game.controls.setPlayerpadShakesWhenControllerDisabled
- mp.game.controls.stopPadShake
- mp.game.controls.useDefaultVehicleEntering
- mp.game.controls.setDisableControlActionBatch
- mp.game.controls.applyDisableControlActionBatch