setVehicleBackfireEnabled
Client
Turns on or off the flames that come out of a vehicle's exhaust by themselves when lifting off the throttle at high revs or shifting up.
bool setVehicleBackfireEnabled(vehicle vehicle, bool enabled)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
| enabled | bool | Turn the automatic flames on or off. |
Returns
true if it changed, false if the vehicle is not streamed in.
The flames start turned on. triggerVehicleBackfire still works with them off.
Example
addEventHandler("onClientElementStreamIn", root, function()
if getElementType(source) == "vehicle" then
setVehicleBackfireEnabled(source, false)
end
end)NoteThe choice lives on the streamed-in vehicle: it is lost when the vehicle streams out.