# setVehicleHydraulics (Shared)

> Fits or removes a vehicle's hydraulics.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicles
- **URL**: https://wiki.mymp.gg/en/setVehicleHydraulics

## Syntax

```lua
bool setVehicleHydraulics(element vehicle, bool fitted)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `element` | The vehicle. It can also be a parent element: every vehicle below it changes. |
| `fitted` | `bool` | `true` fits them, `false` removes them. |

## 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

```lua
addCommandHandler("hidraulica", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        setVehicleHydraulics(vehicle, not getVehicleHydraulics(vehicle))
    end
end)
```

## See also

- [getVehicleHydraulics (Shared)](https://wiki.mymp.gg/en/getVehicleHydraulics.md): Tells whether a vehicle has hydraulics fitted by setVehicleHydraulics.
- [setVehicleHydraulicsControl (Shared)](https://wiki.mymp.gg/en/setVehicleHydraulicsControl.md): Raises each wheel of a vehicle with its hydraulics, with nobody at the controls.
- [setVehicleSuspensionHeight (Shared)](https://wiki.mymp.gg/en/setVehicleSuspensionHeight.md): Raises or lowers a vehicle's suspension.
