Ped::createPed: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
-- OUTDATED --
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 17:
==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 15:21, 23 February 2019

-- OUTDATED --

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