CreatePed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 13: Line 13:


===Returns===
===Returns===
Unknown
Unknown, possibly the element of the ped?


==Example==  
==Example==  

Revision as of 17:56, 14 March 2008

Creates a Ped in the GTA world.

Syntax

ped createPed ( int modelid, float x, float y, float z, float r )

Required Arguments

  • modelid: A whole integer specifying the GTASA skin ID.
  • x: A floating point number representing the X coordinate on the map.
  • y: A floating point number representing the Y coordinate on the map.
  • z: A floating point number representing the Z coordinate on the map.

Returns

Unknown, possibly the element of the ped?

Example

This example creates an ped when the map starts:

function pedLoad ( name )
   -- create an object at a specified position with a specified rotation
   createPed ( 120, 5540.6654, 1020.55122, 1240.545 )
end
addEventHandler ( "onResourceStart", getRootElement(), pedLoad )

See Also