// TaskVehicleMission
void TASK_VEHICLE_MISSION(Ped ped, Vehicle vehicle, Vehicle vehicleTarget, int missionType, float speed, int drivingStyle, float radius, float straightLineDist, BOOL DriveAgainstTraffic);
Parameters:- ped:
The ped to be tasked.
- vehicle:
The vehicles' entity handle.
- vehicleTarget:
The target vehicle.
- missionType:
The mission type (default is 0) (see eVehicleMissionType
).
- speed:
The speed in m/s.
- drivingStyle:
The driving style (default is 0) (see SetDriveTaskDrivingStyle).
- radius:
The radius of when the task will be completed (default is -1.0f).
- straightLineDist:
The distance before the vehicle will drive straight to the target (default is -1.0f).
- DriveAgainstTraffic:
Whether the vehicle should drive against traffic (default is false).
All parameters except ped, vehicle, vehicleTarget and speed are optional; with missionType
being only those that require a target entity.
If you don't want to use a parameter; pass 0
for int parameters, and -1.0f
for the remaining float parameters.
enum eVehicleMissionType
{
None = 0,
Cruise = 1,
Ram = 2,
Block = 3,
GoTo = 4,
Stop = 5,
Attack = 6,
Follow = 7,
Flee = 8,
Circle = 9,
Escort = 12,
GoToRacing = 14,
FollowRecording = 15,
PoliceBehaviour = 16,
Land = 19,
LandAndWait = 20,
Crash = 21,
PullOver = 22,
HeliProtect = 23
}