Player::taskHeliMission: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 36: Line 36:
==Example==
==Example==
<pre>
<pre>
// todo
// Makes the helicopter pilot land on destination (X: 2113.1481, Y: 4799.7558, Z: 41.1516)
heliPed.taskHeliMission(heli.handle, 0, 0, 2113.1481, 4799.7558, 41.1516, 20, 1.0, 5, -1.0, 10, 0, 5.0, 32);
</pre>
</pre>
}}
}}
Line 43: Line 44:
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Revision as of 16:22, 23 May 2020

Client-Side
Function

 JavaScript




JavaScript Syntax

Syntax

player.taskHeliMission(vehicle, p2, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, landingFlag);

Modes

  • 4 (Heads to the destination)
  • 8 (Flee from player)
  • 9 (Circle around the destination)
  • 10 (Take same target's heading)
  • 20 (Lands the heli. on the destination)
  • 21 (Crash on the destination)

Required Arguments

  • vehicle: Vehicle handle or object
  • p2: unk
  • pedToFollow: Ped handle or object
  • posX: float
  • posY: float
  • posZ: float
  • mode: int
  • speed: float
  • radius: float
  • angle: float
  • p11: int
  • height: int
  • p13: float
  • landingFlag: int (Flags: 0 Hover over destination, 32 Land on destination, 1024 Crash into destination, 4096 Rush and Hover to destination)

Return value

  • Undefined

Example

// Makes the helicopter pilot land on destination (X: 2113.1481, Y: 4799.7558, Z: 41.1516)
heliPed.taskHeliMission(heli.handle, 0, 0, 2113.1481, 4799.7558, 41.1516, 20, 1.0, 5, -1.0, 10, 0, 5.0, 32);


See also