TaskPlaneMission
DocsTaskPlaneMission(pilot, aircraft, targetVehicle, targetPed, destinationX, destinationY, destinationZ, missionFlag, angularDrag, unk, targetHeading, maxZ, minZ)Description
EDITED (7/13/2017)
NOTE: If you want air combat, AI::TASK_COMBAT_PED (while your pilot is in an aircraft) also does the same thing as this native.
DESCRIPTION:
Ever wish your buddy could shoot down one of your enemies for you? Ever wanted an auto-pilot? Well look no further! This is the native for you! (Ped intelligence may vary)
USAGE:
-- REQUIRED --
• pilot = The ped flying the aircraft.
• aircraft = The aircraft the pilot is flying
-- OPTIONAL -- [atleast 1 must be assigned]
• targetVehicle = The vehicle the pilot will target.
• targetPed = The ped the pilot will target.
• destinationX, destinationY, destinationZ = The location the pilot will target.
-- LOGIC --
• missionFlag = The type of mission. pastebin.com/R8x73dbv
• angularDrag = The higher the value, the slower the plane will rotate. Value ranges from 0 - Infinity.
• unk = Set to 0, and you'll be fine.
• targetHeading = The target angle (from world space north) that the pilot will try to acheive before executing an attack/landing.
• maxZ = Maximum Z coordinate height for flying.
• minZ = Minimum Z coordinate height for flying.
Z: 2,700 is the default max height a pilot will be able to fly. Anything greater and he will fly downward until reaching 2,700 again.
Mission Types (incase you don't like links..):
0 = None
1 = Unk
2 = CTaskVehicleRam
3 = CTaskVehicleBlock
4 = CTaskVehicleGoToPlane
5 = CTaskVehicleStop
6 = CTaskVehicleAttack
7 = CTaskVehicleFollow
8 = CTaskVehicleFleeAirborne
9 = CTaskVehicleCircle
10 = CTaskVehicleEscort
15 = CTaskVehicleFollowRecording
16 = CTaskVehiclePoliceBehaviour
17 = CTaskVehicleCrash
Example C#:
Function.Call(Hash.TASK_PLANE_MISSION, pilot, vehicle, 0, Game.Player.Character, 0, 0, 0, 6, 0f, 0f, 0f, 2500.0f, -1500f);
Example C++
AI::TASK_PLANE_MISSION(pilot, vehicle, 0, PLAYER::GET_PLAYER_PED(PLAYER::GET_PLAYER_INDEX()), 0, 0, 0, 6, 0.0, 0.0, 0.0, 2500.0, -1500.0);
[DEPRECATED] EXAMPLE USAGE:
pastebin.com/gx7FinskNativeDB Added Parameter 14: Any p13
Parameters
| Name | Type | Description |
|---|---|---|
pilot | Ped | — |
aircraft | Vehicle | — |
targetVehicle | Vehicle | — |
targetPed | Ped | — |
destinationX | float | — |
destinationY | float | — |
destinationZ | float | — |
missionFlag | int | — |
angularDrag | float | — |
unk | float | — |
targetHeading | float | — |
maxZ | float | — |
minZ | float | — |
Quick Snippet: Get Ped HandlepilottargetPed
pilottargetPedUse 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 VehicleaircrafttargetVehicle
aircrafttargetVehicleUse 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.