Element/Ped: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Добавление языков) |
||
(13 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
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 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 [[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== | |||
<syntaxhighlight lang="xml"> | |||
<ped model="" posX="" posY="" posZ="" rotZ="" interior="" frozen="" /> | |||
</syntaxhighlight> | |||
===Required Attributes=== | |||
* '''model''': The [[Character_Skins|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. | |||
{{New feature|3.0110|1.1| | |||
* '''frozen''': A bool indicating whether the ped should be capable of moving | |||
}} | |||
==Related scripting functions== | |||
{{Ped functions}} | |||
[[Category:Element Types]] | |||
[[en:Element/Ped]] | |||
[[ru:Element/Ped]] | |||
[[hu:Element/Ped]] |
Latest revision as of 20:18, 14 April 2021
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="" frozen="" />
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.
- frozen: A bool indicating whether the ped should be capable of moving
Related scripting functions
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle