- Documentation
- Server functions
- setPedCanBeKnockedOffBike
Function
setPedCanBeKnockedOffBike
Sets whether a ped can be knocked off a motorbike or bicycle in a crash. For a player the setting works in their game. For NPCs the value is stored and returned by canPedBeKnockedOffBike.
Syntax
bool setPedCanBeKnockedOffBike(ped ped, bool enabled)Arguments
pedped- A player or an NPC.
enabledbooltrue= can be knocked off (default),false= cannot.
Returns
true on success.
Example
setPedCanBeKnockedOffBike(player, false)