Ped::getRandomPedAtCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed. <br><br>Ped Types:<br>Any = -1<br>Player = 1<br>Male = 4 <br>Female = 5 <br>Cop = 6<br>Human = 26<br>SWAT = 27 <br>Animal = 28<br>Army = 29
Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed. <br><br>Ped Types:<br>Any = -1<br>Player = 1<br>Male = 4 <br>Female = 5 <br>Cop = 6<br>Human = 26<br>SWAT = 27 <br>Animal = 28<br>Army = 29
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">ped.getRandomPedAtCoord(x, y, z, xRadius, yRadius, zRadius, pedType);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.ped.getRandomPedAtCoord(x, y, z, xRadius, yRadius, zRadius, pedType);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 14: Line 14:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Ped_function_c}}
{{Ped_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:29, 6 May 2017

Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed.

Ped Types:
Any = -1
Player = 1
Male = 4
Female = 5
Cop = 6
Human = 26
SWAT = 27
Animal = 28
Army = 29

Syntax

mp.game.ped.getRandomPedAtCoord(x, y, z, xRadius, yRadius, zRadius, pedType);

Required Arguments

  • x: float
  • y: float
  • z: float
  • xRadius: float
  • yRadius: float
  • zRadius: float
  • pedType: int

Return value

  • Ped handle or object

Example

// todo

See also