CreatePed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Zomg teh linkage (Added link to skin lists))
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server client function}}
{{Server client function}}
{{Needs_Checking|CPP has code to handle an extra argument for rotation. Also the server version has code for a second extra argument called bSynced}}
Creates a Ped in the GTA world.
Creates a Ped in the GTA world.



Revision as of 06:33, 23 April 2010

Dialog-information.png This article needs checking.

Reason(s): CPP has code to handle an extra argument for rotation. Also the server version has code for a second extra argument called bSynced

Creates a Ped in the GTA world.

Syntax

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

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

Returns the ped element.

Example

Click to collapse [-]
Server

This example creates an ped when the resource starts:

function pedLoad ( name )
   createPed ( 120, 5540.6654, 1020.55122, 1240.545 )
end
addEventHandler ( "onResourceStart", getRootElement(), pedLoad )

See Also