CreatePed: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
{{Needs_Checking|CPP | {{Needs_Checking|CPP has code for a serverside extra argument called bSynced}} | ||
Creates a Ped in the GTA world. | Creates a Ped in the GTA world. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">ped createPed ( int modelid, float x, float y, float z )</syntaxhighlight> | <syntaxhighlight lang="lua">ped createPed ( int modelid, float x, float y, float z, float rot )</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 12: | Line 12: | ||
*'''y:''' A floating point number representing the Y 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. | *'''z:''' A floating point number representing the Z coordinate on the map. | ||
*'''rot:''' A floating point number representing the rotation in degrees. | |||
===Returns=== | ===Returns=== |
Revision as of 11:58, 4 June 2010
![]() |
This article needs checking. |
Reason(s): CPP has code for a serverside extra argument called bSynced |
Creates a Ped in the GTA world.
Syntax
ped createPed ( int modelid, float x, float y, float z, float rot )
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.
- rot: A floating point number representing the rotation in degrees.
Returns
Returns the ped element.
Example
Click to collapse [-]
ServerThis 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
Shared
- 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