ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onPedDriveBlocked

Event

onPedDriveBlocked

ServerPedsTrilogy Hub only

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)

See also