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

Function

setPedDriveTo

ServerPedsTrilogy Hub only

The NPC driver drives to a single point along the game's roads. onPedDriveFinished fires on arrival.

Syntax

bool setPedDriveTo(ped ped, vehicle vehicle, float x, float y, float z [, table options = nil])

Arguments

pedped
The NPC.
vehiclevehicle
The vehicle.
xfloat
Target X.
yfloat
Target Y.
zfloat
Target Z.
optionstable, optional = nil
As in setPedDriveRoute (without loop).

Returns

true when the drive started.

Example

setPedDriveTo(taxiDriver, taxi, 2495, -1665, 13.3, { speed = 60 })

See also