AR/setElementPosition
From Multi Theft Auto: Wiki
هذه الوظيفة تستخدم لنقل الالمنت او الشيئ لاحداثيات محددة.
Attention: Do not use this function to spawn a player. It will cause problems with other functions like warpPedIntoVehicle.
Use spawnPlayer instead.
Syntax
bool setElementPosition ( element theElement, float x, float y, float z [, bool warp = true ] )
OOP Syntax Help! I don't understand this!
- Method: element:setPosition(...)
- Variable: .position
- Counterpart: getElementPosition
شرح الارقمنتات
- theElement: الالمنت الذي تريد جلب احداثيات.
- x: الاحداثيات x.
- y: الاحداثيات y.
- z: الاحداثيات z.
Optional Arguments
- warp: ان كنت تريد نقل الاعب.
Returns
Returns true if the function was successful, false otherwise.
Example
Click to collapse [-]
Example 1هذه الوظيفة عند كتابة امر باف8 تقوم بنقل الاعب.
function consoleSetPlayerPosition ( source, commandName, posX, posY, posZ ) setElementPosition ( source, posX, posY, posZ ) end addCommandHandler ( "setpos", consoleSetPlayerPosition )
Click to expand [+]
Example 2Click to expand [+]
Example 3See Also
- clearElementVisibleTo
- cloneElement
- createElement
- destroyElement
- getAllElementData
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementCollisionsEnabled
- getElementAttachedTo
- getElementByID
- getElementByIndex
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementColShape
- getElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementType
- getElementVelocity
- getElementZoneName
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementVisibleTo
- isElementWaitingForGroundToLoad
- isElementWithinColShape
- removeElementData
- setElementAlpha
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDoubleSided
- setElementDimension
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementParent
- setElementPosition
- setElementSyncer
- setElementRotation
- setElementVelocity
- setElementVisibleTo
- attachElements
- detachElements
- getElementModel
- getElementSyncer
- isElementInWater
- setElementAttachedOffsets
- setElementModel
- setLowLODElement
- getLowLODElement
- isElementLowLOD