TaskVehicleEscort
DocsTaskVehicleEscort(ped, vehicle, targetVehicle, mode, speed, drivingStyle, minDistance, p7, noRoadsDistance)Description
Makes a ped follow the targetVehicle with <minDistance> in between.
note: minDistance is ignored if drivingstyle is avoiding traffic, but Rushed is fine.
Mode: The mode defines the relative position to the targetVehicle. The ped will try to position its vehicle there.
-1 = behind
0 = ahead
1 = left
2 = right
3 = back left
4 = back right
if the target is closer than noRoadsDistance, the driver will ignore pathing/roads and follow you directly.
Driving Styles guide: gtaforums.com/topic/822314-guide-driving-styles/Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
vehicle | Vehicle | — |
targetVehicle | Vehicle | — |
mode | int | — |
speed | float | — |
drivingStyle | int | The driving style (default is 0) (see [SetDriveTaskDrivingStyle](#\_0xDACE1BE37D88AF67)). |
minDistance | float | — |
p7 | int | — |
noRoadsDistance | float | — |
Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Quick Snippet: Get VehiclevehicletargetVehicle
vehicletargetVehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaPed Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.