setVehicleLightTrailsEnabled
Client
Turns on or off red light trails behind a vehicle's lit tail lamps, longer the faster it goes.
bool setVehicleLightTrailsEnabled(vehicle vehicle, bool enabled)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
| enabled | bool | Turn the trails on or off. |
Returns
true if it changed, false if the vehicle is not streamed in.
The trails start turned off.
Example
addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(vehicle)
setVehicleLightTrailsEnabled(vehicle, true)
end)NoteThe choice lives on the streamed-in vehicle: it is lost when the vehicle streams out.