NativeHub
All NativesModelsArtifactsCFXVehicle

Not affiliated with Rockstar Games or Take-Two Interactive. FiveM and Cfx.re are trademarks of their respective owners. cfxnatives.dev is an independent community project.

Maintained by uz-scripts

© 2026 cfxnatives.dev

contact@cfxnatives.dev
TASKClient
Artifact25963
Data sourced from jgscripts artifact-db

TaskPlaneMission

Docs
TaskPlaneMission(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/gx7Finsk

NativeDB Added Parameter 14: Any p13

Parameters

NameTypeDescription
pilotPed—
aircraftVehicle—
targetVehicleVehicle—
targetPedPed—
destinationXfloat—
destinationYfloat—
destinationZfloat—
missionFlagint—
angularDragfloat—
unkfloat—
targetHeadingfloat—
maxZfloat—
minZfloat—
🚶Quick Snippet: Get Ped Handle
pilottargetPed

Use 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 Vehicle
aircrafttargetVehicle

Use 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")
end
🚗

Vehicle Models

View All
Adder
adder
Alpha
alpha
Blade
blade
Ardent
ardent
Asea
asea
Cogcabrio
cogcabrio
Baller
baller
Blista
blista
🚶

Ped Models

View All
Mp M Freemode 0 1
mp_m_freemode_01
Player Zero
player_zero
Ig Agatha
ig_agatha
S M Y Cop 0 1
s_m_y_cop_01
S M M Gaffer 0 1
s_m_m_gaffer_01
G M M Armboss 0 1
g_m_m_armboss_01
A C Boar
a_c_boar
A M M Bevhills 0 1
a_m_m_bevhills_01

Returns

void

This native does not return a value.

Server Artifacts

Data sourced from jgscripts artifact-db
Recommended25963
Known Issues24
25987-25988Node.js sandboxing seems to be causing issues for people - best to avoid for now
21547Multiple (unconfirmed) reports of server-sided natives throwing errors or causing crashes; best to avoid
17462Failed build, ignore
16276Multiple reports of issues loading JS within resources
14583-14716Crash when using the new onEntityBucketChange
14583-14862Timeouts due to latency units being in nanoseconds
13759-13890Mumble (voice) external connections blocked by default
13380-13458Server crashing due to integer encoding (PR#3235)
13079Failed Linux build (works OK if using Windows!)
12933-13045Still crashes (sometimes) when restarting resources due to Node.js 22
12913-12932Causes a crash when restarting Node.js 22
12767os.date() appends null terminator; can break Lua scripts
12651Failed Linux build, ignore
12509Failed build, ignore
12255Unconfirmed, but several reports of server-side issues that don't persist when downgrading; best to avoid
12160-12165Cannot use entity native calls in entityRemoved
12151Crashing if using newest title update (TU)
12092-12135SetPlayerModel may cause SIGSEGV crashes on some clients due to changes in player handling. 12031 and below works fine.
12078-12083Some clients will fail to connect with 'ReadBulk of header failed' error
10930Failed build, ignore
10268-10309sv_experimentalNetGameEventHandler enabled by default; can cause server crashing and reports of issues downgrading after upgrading
10191GetVehicleNumberPlateText server native broken, will cause issues with scripts involving vehicles
10072Crashing when players join
8509State bags not replicated to clients

CommunitySnippets

No snippets yet. Be the first to contribute!