Skip to main content

Controls::applyDisableControlActionBatch

Not available on SYNC MP yet

This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.

Client-side function

JavaScript​

Applies disabled control given in [setDisableControlActionBatch]

Return Value​

  • void void

Syntax​

mp.game.controls.applyDisableControlActionBatch();

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);