Element/Ped: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 8: Line 8:
==XML syntax==
==XML syntax==
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<ped model="" posX="" posY="" posZ="" rotZ=""/>
<ped model="" posX="" posY="" posZ="" rotZ="" interior="" />
</syntaxhighlight>
</syntaxhighlight>


Line 19: Line 19:
===Optional Attributes===
===Optional Attributes===
* '''rotZ''': A float representing the Z rotation of the ped.
* '''rotZ''': A float representing the Z rotation of the ped.
* '''interior''': A interior where the ped spawns.


==Related scripting functions==
==Related scripting functions==
{{Ped functions}}
{{Ped functions}}
[[Category:Element Types]]
[[Category:Element Types]]

Revision as of 20:04, 4 April 2009

The word "ped" is short for "pedestrian" and describes any person in GTA, be it a player or an NPC character. (And even though "pedestrian" doesn't technically apply to people that drive, they still fall under this name)

The createPed function specifically creates an NPC, but all other ped functions work on both players and NPC's as they're pretty much the same thing to San Andreas.

The element type of a NPC is "ped".

XML syntax

<ped model="" posX="" posY="" posZ="" rotZ="" interior="" />

Required Attributes

  • model: The character skin ID of the ped being created.
  • posX: A float representing the X position of the ped.
  • posY: A float representing the Y position of the ped.
  • posZ: A float representing the Z position of the ped.

Optional Attributes

  • rotZ: A float representing the Z rotation of the ped.
  • interior: A interior where the ped spawns.

Related scripting functions