# setVehicleWheelState (Shared)

> Changes the state of one or more wheels of a vehicle: inflated, flat, fallen off or without collision.

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

## Syntax

```lua
bool setVehicleWheelState(element vehicle, int|string|table wheel, int state)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `element` | The vehicle, or a parent element whose vehicles all change. |
| `wheel` | `int\|string\|table` | Which wheel: its number (0 front left, 1 rear left, 2 front right, 3 rear right), its frame name (`wheel_lf`, `wheel_lr`, `wheel_rf`, `wheel_rr`), a group (`all`, `front_wheels`, `rear_wheels`, `left_wheels`, `right_wheels`), `-1` for all of them or a table of several. |
| `state` | `int` | The new state: 0 inflated, 1 flat, 2 fallen off, 3 drawn but without collision. |

## Returns

`true` if any wheel changed. `false` if the state is out of range, the vehicle lacks the wheel or it was already in that state.

Given a parent element such as `root`, it applies to every vehicle below it, but the value returned is the element's own: `false` when it is not a vehicle.

## Example

```lua
addCommandHandler("furar", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        setVehicleWheelState(vehicle, "rear_wheels", 1)
    end
end)
```

## See also

- [getVehicleWheelState (Shared)](https://wiki.mymp.gg/en/getVehicleWheelState.md): Returns the state of one or more wheels of a vehicle.
- [setVehicleWheelStates (Shared)](https://wiki.mymp.gg/en/setVehicleWheelStates.md): Changes the state of a vehicle's four wheels at once.
- [fixVehicle (Shared)](https://wiki.mymp.gg/en/fixVehicle.md): Repairs a vehicle completely: its health goes back to 1000 and its doors, wheels and lights to their initial state, with no dents or bullet holes.
