Перейти к содержанию

Vehicle::getRandomVehicleInSphere

Материал из RAGE MP Wiki Archive
Версия от 21:34, 6 мая 2017; imported>Marty uploader (yay)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

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

<syntaxhighlight lang="javascript">mp.game.vehicle.getRandomVehicleInSphere(x, y, z, radius, modelHash, flags);</syntaxhighlight>

Required Arguments

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

Return value

  • Vehicle handle or object

Example

<syntaxhighlight lang="javascript"> // todo </syntaxhighlight>

See also