Quantcast

Jump to content

» «
Photo

How to make a ped fly a plane?

3 replies to this topic
NoNameSet
  • NoNameSet

    Player Hater

  • Members
  • Joined: 22 Jul 2017
  • Germany

#1

Posted 4 weeks ago Edited by NoNameSet, 4 weeks ago.

I was looking through the natives a while back and saw:

AI::TASK_PLANE_MISSION

Hashes: 0x23703CD154E83B88 0x1D007E65

void TASK_PLANE_MISSION(Ped pilot, Vehicle aircraft, Vehicle targetVehicle,
  Ped targetPed, float destinationX, float destinationY,
  float destinationZ, int missionFlag, float angularDrag,
  float unk, float targetHeading, float maxZ, float minZ)
// 0x23703CD154E83B88 0x1D007E65

my question is how do I get the ped in the plane to land it? yes I have used:

 

AI::TASK_PLANE_LAND Hashes: 0xBF19721FA34D32C0 0x5F7E23EA
void TASK_PLANE_LAND(Ped pilot, Vehicle plane, float runwayStartX,
  float runwayStartY, float runwayStartZ, float runwayEndX,
  float runwayEndY, float runwayEndZ)
// 0xBF19721FA34D32C0 0x5F7E23EA

Function.Call(Hash.TASK_PLANE_LAND, pilot, selectedAirplane, runwayStartPoint.X, runwayStartPoint.Y, runwayStartPoint.Z, runwayEndPoint.X, runwayEndPoint.Y, runwayEndPoint.Z);

 

I used both natives with these values:

NativeFunction.CallByName<uint>("TASK_PLANE_LAND", Pilot, Airplane, -1590.22693f, -2679.10132f, 14.5475368f, 1518.075f, 3116.2063f, 41.1344452f);
NativeFunction.CallByName<uint>("TASK_PLANE_MISSION", Pilot, Airplane, 0, 0, 1518.075f, 3116.2063f, 41.1344452f, 0, 100f, 0f, 331.158356f, 200f, 400f);

 

what the ped does:

takes of at x,y,z then goes to the end destination and circles around it. I know this is possibly because of the missiontype but if I set it to none TASK_PLANE_LAND will take over and just start from x,y,z and won't even bother to go up...

 

thanks for any help.


NoNameSet
  • NoNameSet

    Player Hater

  • Members
  • Joined: 22 Jul 2017
  • Germany

#2

Posted 4 weeks ago

*knock knock*


aimless
  • aimless

    Crackhead

  • Members
  • Joined: 30 Jul 2015
  • United-States

#3

Posted 4 weeks ago

As far as i can tell TASK_PLANE_LAND does not work. Use TASK_PLANE_MISSION to fly down the runnway and decrease hight. These are the settings i use.
Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z, 4, 40.0f, 70.0f, -1.0f, 50.0f, 20.0f);// fly to coord use multiple times(positions) to line up with runnway

Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z + 10.0f, 4, 30.0f, 10.0f, -1.0f, 20.0f, -50.0f);// start to land

Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z + 2.0f, 4, 20.0f, 12.0f, -1.0f, 20.0f, -50.0f);// land

Then use a drive task to taxi on runnway.

  • NoNameSet likes this

NoNameSet
  • NoNameSet

    Player Hater

  • Members
  • Joined: 22 Jul 2017
  • Germany

#4

Posted 4 weeks ago

As far as i can tell TASK_PLANE_LAND does not work. Use TASK_PLANE_MISSION to fly down the runnway and decrease hight. These are the settings i use.
Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z, 4, 40.0f, 70.0f, -1.0f, 50.0f, 20.0f);// fly to coord use multiple times(positions) to line up with runnway

Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z + 10.0f, 4, 30.0f, 10.0f, -1.0f, 20.0f, -50.0f);// start to land

Function.Call(Hash.TASK_PLANE_MISSION, 0, plane, 0, 0, position.X, position.Y, position.Z + 2.0f, 4, 20.0f, 12.0f, -1.0f, 20.0f, -50.0f);// land

Then use a drive task to taxi on runnway.

thanks, I'll try that in a few





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users