TasksClient

taskVehicleFollow

TASK_VEHICLE_FOLLOW0xFC545A9F0626E3B6

The GTA V native TASK_VEHICLE_FOLLOW of the TASK namespace, as LS:MP client scripts call it: the global function taskVehicleFollow, in JavaScript and in Lua.

SignatureJavaScript
taskVehicleFollow(
  driver: Ped,
  vehicle: Vehicle,
  targetEntity: Entity,
  speed: number,
  drivingStyle: number,
  minDistance: number
): void
SignatureLua
taskVehicleFollow(
  driver: Ped,
  vehicle: Vehicle,
  targetEntity: Entity,
  speed: number,
  drivingStyle: integer,
  minDistance: integer
)

Usage

JavaScript
taskVehicleFollow(driver, vehicle, targetEntity, speed, drivingStyle, minDistance);
Lua
taskVehicleFollow(driver, vehicle, targetEntity, speed, drivingStyle, minDistance)

Parameters

ParameterTypeJavaScriptLuaDescription
driverPednumberinteger
vehicleVehiclenumberinteger
targetEntityEntitynumberinteger
speedfloatnumbernumber
drivingStyleintnumberintegerhttps://gtaforums.com/topic/822314-guide-driving-styles/
minDistanceintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Makes a ped in a vehicle follow an entity (ped, vehicle, etc.)

Reference

Namespace
Tasks TASK
In the game
void TASK_VEHICLE_FOLLOW(Ped driver, Vehicle vehicle, Entity targetEntity, float speed, int drivingStyle, int minDistance)
Hash
0xFC545A9F0626E3B6
Formerly
_TASK_VEHICLE_FOLLOW

Open in the interactive natives reference