Vehicle::defaultEngineBehaviour: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Lets you disable the default engine behaviour (when you enter a vehicle, the player automatically turns on the engine). Setting this to false will stop the player from turning...")
 
m (Incorrect note for use. Should be using Config Flag as well to ensure Animation is fixed)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Lets you disable the default engine behaviour (when you enter a vehicle, the player automatically turns on the engine). Setting this to false will stop the player from turning the engine on.
{{ClientsideJsFunction}}
Lets you disable the default engine behaviour (when you enter a vehicle, the player automatically turns on the engine). Setting this to false will stop the player from turning the engine on.<br>


<b>Note:</b><br>
It is best to set the config flag: [[Player_Config_Flags|PED_FLAG_STOP_ENGINE_TURNING]] - to ensure the player doesn't attempt to turn the engine resulting in a strange animation.
<pre>mp.players.local.setConfigFlag(429, true);</pre>
{{JSContainer|
== Syntax ==
== Syntax ==


<pre>
<pre>
mp.game.vehicle.defaultEngineBehaviour = enabled;
mp.game.vehicle.defaultEngineBehaviour = flag;
</pre>
</pre>


=== Parameters ===
=== Parameters ===
*'''enabled''': {{RageType|Boolean}}
*'''flag''': {{RageType|Boolean}}


== Examples ==
== Examples ==
Line 16: Line 24:
mp.game.vehicle.defaultEngineBehaviour = false;
mp.game.vehicle.defaultEngineBehaviour = false;
</pre>
</pre>
}}


==See also==
==See also==
{{Vehicle_s_function_c}}
{{Vehicle_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]

Latest revision as of 19:22, 23 May 2021

Client-Side
Function

 JavaScript



Lets you disable the default engine behaviour (when you enter a vehicle, the player automatically turns on the engine). Setting this to false will stop the player from turning the engine on.

Note:
It is best to set the config flag: PED_FLAG_STOP_ENGINE_TURNING - to ensure the player doesn't attempt to turn the engine resulting in a strange animation.

mp.players.local.setConfigFlag(429, true);


JavaScript Syntax

Syntax

mp.game.vehicle.defaultEngineBehaviour = flag;

Parameters

  • flag: Boolean

Examples

Simply disables people from turning on their engine within the server.

mp.game.vehicle.defaultEngineBehaviour = false;


See also