Ped::createRandomPed: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
vb.net<br>Dim ped_handle As Integer<br>                    With Game.Player.Character<br>                        Dim pos As Vector3 = .Position + .ForwardVector * 3<br>                        ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z)<br>                    End With<br><br>Creates a Ped at the specified location, returns the Ped Handle.  <br>Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called.
vb.net<br>Dim ped_handle As Integer<br>                    With Game.Player.Character<br>                        Dim pos As Vector3 = .Position + .ForwardVector * 3<br>                        ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z)<br>                    End With<br><br>Creates a Ped at the specified location, returns the Ped Handle.  <br>Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">ped.createRandomPed(posX, posY, posZ);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.ped.createRandomPed(posX, posY, posZ);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''posX:''' float
*'''posX:''' float
Line 10: Line 10:
==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

vb.net
Dim ped_handle As Integer
With Game.Player.Character
Dim pos As Vector3 = .Position + .ForwardVector * 3
ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z)
End With

Creates a Ped at the specified location, returns the Ped Handle.
Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called.

Syntax

mp.game.ped.createRandomPed(posX, posY, posZ);

Required Arguments

  • posX: float
  • posY: float
  • posZ: float

Return value

  • Ped handle or object

Example

// todo

See also