CreatePed

From Multi Theft Auto: Wiki
Revision as of 21:45, 13 March 2008 by Stevvo (talk | contribs) (New page: __NOTOC__ {{Server client function}} Creates a Ped in the GTA world. ==Syntax== <syntaxhighlight lang="lua">object createPed ( int modelid, float x, float y, float z, float r )</syntaxhighlight> ===Required Ar...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Creates a Ped in the GTA world.

Syntax

object 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

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