Vehicle::getRandomVehicleInSphere: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
Gets a random vehicle in a sphere at the specified position, of the specified radius.<br><br>x: The X-component of the position of the sphere.<br>y: The Y-component of the position of the sphere.<br>z: The Z-component of the position of the sphere.<br>radius: The radius of the sphere. Max is 9999.9004.<br>modelHash: The vehicle model to limit the selection to. Pass 0 for any model.<br>flags: The bitwise flags that modifies the behaviour of this function.
Gets a random vehicle in a sphere at the specified position, of the specified radius.<br><br>x: The X-component of the position of the sphere.<br>y: The Y-component of the position of the sphere.<br>z: The Z-component of the position of the sphere.<br>radius: The radius of the sphere. Max is 9999.9004.<br>modelHash: The vehicle model to limit the selection to. Pass 0 for any model.<br>flags: The bitwise flags that modifies the behaviour of this function.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">vehicle.getRandomVehicleInSphere(x, y, z, radius, modelHash, flags);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.vehicle.getRandomVehicleInSphere(x, y, z, radius, modelHash, flags);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 13: Line 13:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:34, 6 May 2017

Gets a random vehicle in a sphere at the specified position, of the specified radius.

x: The X-component of the position of the sphere.
y: The Y-component of the position of the sphere.
z: The Z-component of the position of the sphere.
radius: The radius of the sphere. Max is 9999.9004.
modelHash: The vehicle model to limit the selection to. Pass 0 for any model.
flags: The bitwise flags that modifies the behaviour of this function.

Syntax

mp.game.vehicle.getRandomVehicleInSphere(x, y, z, radius, modelHash, flags);

Required Arguments

  • x: float
  • y: float
  • z: float
  • radius: float
  • modelHash: Model hash or name
  • flags: int

Return value

  • Vehicle handle or object

Example

// todo

See also