- Documentation
- Server functions
- stopPedDriving
Function
stopPedDriving
Ends a drive started with setPedDriveRoute or setPedDriveTo. The NPC stays at the wheel and the vehicle brakes.
Syntax
bool stopPedDriving(ped ped)Arguments
pedped- The NPC.
Returns
true if the NPC was driving.
Example
stopPedDriving(driver)
See also
setPedDriveRouteThe NPC driver follows a list of points along the game's roads. The game's autopilot drives: it turns at junctions, avoids cars and waits at red lights.onPedDrivePointReachedfires after each point andonPedDriveFinishedafter the last one. If the driver's seat is free, the NPC is put into it.getPedDriveStateReturns the NPC's driving state and the index of the current route point.