Controls::disableControlAction: Difference between revisions
m (Replaced HTML with template) |
MrPancakers (talk | contribs) 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:''' | *'''inputGroup:''' {{RageType|Int}} ([[InputGroup|Input Groups]]) | ||
*'''control:''' | *'''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]] | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 09:27, 14 January 2019
Client-Side Function
Disable a control so it cannot be used.
Syntax
mp.game.controls.disableControlAction(inputGroup, control, disable);
Required Arguments
- inputGroup: Int (Input Groups)
- control: Int (Game Controls)
- disable: Boolean
Return value
- Boolean
Example
This will disable using the character wheel
Client-Side
mp.events.add('render', () => {
mp.game.controls.disableControlAction(2, 19, true);
});