setVehicleHydraulicsControl
Shared
Raises each wheel of a vehicle with its hydraulics, with nobody at the controls.
bool setVehicleHydraulicsControl(element vehicle, float frontLeft, float rearLeft, float frontRight, float rearRight)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | element | The vehicle. It can also be a parent element: every vehicle below it changes. |
| frontLeft | float | Front left, from 0 (at rest) to 1 (fully raised). |
| rearLeft | float | Rear left, from 0 to 1. |
| frontRight | float | Front right, from 0 to 1. |
| rearRight | float | Rear right, from 0 to 1. |
Returns
true if the element given is a vehicle and it changed. With a parent element, the vehicles below it change even when the result is false.
Called on the server, the change reaches every player.
Example
local car = createVehicle("savanna", 2495, -1665, 13.3)
setVehicleHydraulics(car, true)
setVehicleHydraulicsControl(car, 1, 0, 1, 0)NoteA value outside 0 to 1 is an error. It only has an effect while no player drives the vehicle.