note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
ManualVehicleEngineAndLights
Description
Use this function before any player connects (OnGameModeInit) to tell all clients that the script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when players enter/exit vehicles and headlights automatically coming on when it is dark.
Examples
public OnGameModeInit()
{
ManualVehicleEngineAndLights();
return 1;
}
Notes
warning
Is it not possible to reverse this function after it has been used. You must either use it or not use it.
tip
You can also enable or disable this function via config.json
"use_manual_engine_and_lights": true,
Related Functions
- SetVehicleParamsEx: Sets a vehicle's params for all players.
- GetVehicleParamsEx: Get a vehicle's parameters.
- SetVehicleParamsForPlayer: Set the parameters of a vehicle for a player.