M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
vehicleelementThe vehicle. It can also be a parent element: every vehicle below it changes.
frontLeftfloatFront left, from 0 (at rest) to 1 (fully raised).
rearLeftfloatRear left, from 0 to 1.
frontRightfloatFront right, from 0 to 1.
rearRightfloatRear 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.

See also