TonyVk

Untitled

Aug 1st, 2019
772
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. aircraft = CreateVehicle(GetHashKey("cuban800"), rPlaneSpawn, heading, true, true)
  2. SetEntityHeading(aircraft, heading)
  3. SetVehicleDoorsLocked(aircraft, 2) -- lock the doors so pirates don't get in
  4. SetEntityDynamic(aircraft, true)
  5. ActivatePhysics(aircraft)
  6. SetVehicleForwardSpeed(aircraft, 60.0)
  7. SetHeliBladesFullSpeed(aircraft) -- works for planes I guess
  8. SetVehicleEngineOn(aircraft, true, true, false)
  9. ControlLandingGear(aircraft, 3) -- retract the landing gear
  10. OpenBombBayDoors(aircraft) -- opens the hatch below the plane for added realism
  11. SetEntityProofs(aircraft, true, false, true, false, false, false, false, false)
  12.  
  13. pilot = CreatePedInsideVehicle(aircraft, 1, GetHashKey("s_m_m_pilot_02"), -1, true, true)
  14. SetBlockingOfNonTemporaryEvents(pilot, true) -- ignore explosions and other shocking events
  15. SetPedRandomComponentVariation(pilot, false)
  16. SetPedKeepTask(pilot, true)
  17. SetPlaneMinHeightAboveTerrain(aircraft, 50) -- the plane shouldn't dip below the defined altitude
  18.  
  19. TaskVehicleDriveToCoord(pilot, aircraft, vector3(dropCoords.x, dropCoords.y, dropCoords.z) + vector3(0.0, 0.0, 500.0), 60.0, 0, GetHashKey("cuban800"), 262144, 15.0, -1.0) -- to the dropsite, could be replaced with a task sequence
Advertisement
Add Comment
Please, Sign In to add comment