Controls::disableControlAction: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
No edit summary
Line 1: Line 1:
{{ClientsideJsFunction}}
Disable a control so it cannot be used.
== Syntax ==
<pre>
<pre>
mp.game.controls.disableControlAction(inputGroup, control, disable);
mp.game.controls.disableControlAction(inputGroup, control, disable);
Line 4: Line 8:


=== Required Arguments ===
=== Required Arguments ===
*'''inputGroup:''' int
*'''inputGroup:''' {{RageType|Int}} ([[InputGroup|Input Groups]])
*'''control:''' int
*'''control:''' {{RageType|Int}} ([[Controls|Game Controls]])
*'''disable:''' Boolean
*'''disable:''' {{RageType|Boolean}}


===Return value===
===Return value===
Line 12: Line 16:


==Example==
==Example==
This will disable using the character wheel
{{ClientsideCode|
{{ClientsideCode|
<pre>
<pre>
Line 22: Line 27:
==See also==
==See also==
[[Controls_s_function_c]]
[[Controls_s_function_c]]
*[[Controls|Game Controls]]
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Revision as of 09:27, 14 January 2019

Client-Side
Function

 JavaScript



Disable a control so it cannot be used.

Syntax

mp.game.controls.disableControlAction(inputGroup, control, disable);

Required Arguments

Return value

  • Boolean

Example

This will disable using the character wheel

Client-Side
mp.events.add('render', () => {
    mp.game.controls.disableControlAction(2, 19, true);
});

See also

Controls_s_function_c