# canPedBeKnockedOffBike (Client)

> Tells whether a ped can be knocked off a bike or motorbike in a crash.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Peds
- **URL**: https://wiki.mymp.gg/en/canPedBeKnockedOffBike

## Syntax

```lua
bool canPedBeKnockedOffBike(ped ped)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `ped` | The ped or player. |

## Returns

`true` if it can fall off, `false` if it cannot.

## Example

```lua
if canPedBeKnockedOffBike(localPlayer) then
    setPedCanBeKnockedOffBike(localPlayer, false)
end
```

## See also

- [setPedCanBeKnockedOffBike (Client)](https://wiki.mymp.gg/en/setPedCanBeKnockedOffBike.md): Sets whether a ped can be knocked off a bike or motorbike in a crash.
- [getPedBikeControl (Client)](https://wiki.mymp.gg/en/getPedBikeControl.md): Gets a ped's skill at riding bikes and motorbikes.
