ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getPedDriveState

Function

getPedDriveState

ServerPedsTrilogy Hub only

Returns the NPC's driving state and the index of the current route point.

Syntax

string, int getPedDriveState(ped ped)

Arguments

pedped
The NPC.

Returns

"driving", "stopped" (a stopAt stop), "arrived" (end of the route) or "blocked" (standing for over 8 s outside a stop: traffic, a red light, a blocked road) and the point index; false if the NPC is not driving.

Example

local state, index = getPedDriveState(driver)

See also