- Documentation
- Server events
- onPedDriveBlocked
Event
onPedDriveBlocked
The NPC driver has been standing for over 8 s outside a stop (traffic, a red light, a player blocking the road). It fires every 8 s until the vehicle moves.
Handler
addEventHandler("onPedDriveBlocked", root, function(vehicle, seconds) ... end)Parameters
vehiclevehicle- The vehicle.
secondsint- How long it has been standing, in seconds.
Source
source is the NPC.
Example
addEventHandler("onPedDriveBlocked", driver, function(vehicle, seconds)
if seconds >= 30 then stopPedDriving(source) end
end)