TASK_VEHICLE_DRIVE_TO_DESTINATION
Hash
0x7F241A0D14354583Runtime name
TaskVehicleDriveToDestinationNamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
Signature
void TASK_VEHICLE_DRIVE_TO_DESTINATION(Ped driver, Vehicle vehicle, float x, float y, float z, float speed, int drivingFlags, int p7, float stoppingRange1, float stoppingRange2, BOOL p10);Parameters
| Name | Type | Description |
|---|---|---|
driver | Ped | — |
vehicle | Vehicle | — |
x | float | — |
y | float | — |
z | float | — |
speed | float | — |
drivingFlags | int | — |
p7 | int | — |
stoppingRange1 | float | — |
stoppingRange2 | float | — |
p10 | BOOL | — |
Returns void
Description
flags: 67108864, 2097152, 524564, 524675 (eDrivingFlags)
p7 = 6 or 3
p8 = x coordinate
p9 - 8.f
p10 = false
Usage
TaskVehicleDriveToDestination(driver, vehicle, x, y, z, speed, drivingFlags, p7, stoppingRange1, stoppingRange2, p10)
-- always works, by hash
Citizen.InvokeNative(0x7F241A0D14354583, driver, vehicle, x, y, z, speed, drivingFlags, p7, stoppingRange1, stoppingRange2, p10)JavaScript and C#
TaskVehicleDriveToDestination(driver, vehicle, x, y, z, speed, drivingFlags, p7, stoppingRange1, stoppingRange2, p10);
// by hash
Citizen.invokeNative('0x7F241A0D14354583', driver, vehicle, x + 0.0000001, y + 0.0000001, z + 0.0000001, speed + 0.0000001, drivingFlags, p7, stoppingRange1 + 0.0000001, stoppingRange2 + 0.0000001, p10);Function.Call((Hash)0x7F241A0D14354583, driver, vehicle, x, y, z, speed, drivingFlags, p7, stoppingRange1, stoppingRange2, p10);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.