Vehicle::defaultEngineBehaviour: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Incorrect note for use. Should be using Config Flag as well to ensure Animation is fixed)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{ClientsideJsFunction}}
{{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>


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.


If your character is twitching, you need to toggle vehicle's engine for calm your character.


{{JSContainer|
{{JSContainer|

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