Ped::createPed: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
Line 1: Line 1:
p7 - last parameter does not mean ped handle is returned<br>maybe a quick view in disassembly will tell us what is actually does<br><br><br>*Heading*: 0.0<br>*Heading* is the Z axis spawn rotation of the ped 0-&gt;5th parameter.<br><br>Ped Types:<br>[Player,1|Male,4|Female,5|Cop,6|Human,26|SWAT,27|Animal,28|Army,29]<br>You can also use GET_PED_TYPE
p7 - last parameter does not mean ped handle is returned<br>maybe a quick view in disassembly will tell us what is actually does<br><br><br>*Heading*: 0.0<br>*Heading* is the Z axis spawn rotation of the ped 0-&gt;5th parameter.<br><br>Ped Types:<br>[Player,1|Male,4|Female,5|Cop,6|Human,26|SWAT,27|Animal,28|Army,29]<br>You can also use GET_PED_TYPE
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">ped.createPed(pedType, modelHash, x, y, z, heading, networkHandle, pedHandle);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.ped.createPed(pedType, modelHash, x, y, z, heading, networkHandle, pedHandle);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''pedType:''' int
*'''pedType:''' int
Line 15: Line 15:
==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]]

Revision as of 21:29, 6 May 2017

p7 - last parameter does not mean ped handle is returned
maybe a quick view in disassembly will tell us what is actually does


*Heading*: 0.0
*Heading* is the Z axis spawn rotation of the ped 0->5th parameter.

Ped Types:
[Player,1|Male,4|Female,5|Cop,6|Human,26|SWAT,27|Animal,28|Army,29]
You can also use GET_PED_TYPE

Syntax

mp.game.ped.createPed(pedType, modelHash, x, y, z, heading, networkHandle, pedHandle);

Required Arguments

  • pedType: int
  • modelHash: Model hash or name
  • x: float
  • y: float
  • z: float
  • heading: float
  • networkHandle: Boolean
  • pedHandle: Boolean

Return value

  • Ped handle or object

Example

// todo

See also