Controls::setDisableControlActionBatch

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax

Required Params

  • isMoveOrLookInputGroup Boolean
  • controls Number[]


Return Value

  • void void

Syntax

mp.game.controls.setDisableControlActionBatch(isMoveOrLookInputGroup, controls);

Example

Client-Side
const disablePlayerControls = [
    0, 30, 31, 21, 36, 22, 44, 38, 71, 72, 59, 60, 42, 43, 85, 86, 75, 15, 14,
    228, 37, 229, 348, 156, 199, 204, 172, 173, 37, 199, 44, 178, 244, 220,
    221, 218, 219, 16, 17, 200, 202, 322
];
mp.game.controls.setDisableControlActionBatch(false, disablePlayerControls);


mp.events.add('render', () => {
    mp.game.controls.applyDisableControlActionBatch()
});

//re-enable player controls after 5 seconds
setTimeout(() => {
    mp.game.controls.setDisableControlActionBatch(false, []);
}, 5000);


See also