AR/setElementPosition
Jump to navigation
Jump to search
هذه الوظيفة تستخدم لنقل الالمنت او الشيئ لاحداثيات محددة.
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
- attachElements
- createElement
- destroyElement
- detachElements
- getAttachedElements
- getElementAlpha
- getElementAttachedOffsets
- getElementAttachedTo
- getElementByIndex
- getElementByID
- getElementChild
- getElementChildren
- getElementChildrenCount
- getElementCollisionsEnabled
- getElementColShape
- getElementData
- getAllElementData
- hasElementData
- getElementDimension
- getElementHealth
- getElementID
- getElementInterior
- getElementMatrix
- getElementModel
- getElementParent
- getElementPosition
- getElementRotation
- getElementsByType
- getElementsWithinColShape
- getElementsWithinRange
- getElementType
- getElementVelocity
- getLowLODElement
- getRootElement
- isElement
- isElementAttached
- isElementCallPropagationEnabled
- isElementDoubleSided
- isElementFrozen
- isElementInWater
- isElementLowLOD
- isElementWithinColShape
- isElementWithinMarker
- setElementAlpha
- setElementAngularVelocity
- getElementAngularVelocity
- setElementAttachedOffsets
- setElementCallPropagationEnabled
- setElementCollisionsEnabled
- setElementData
- setElementDimension
- setElementDoubleSided
- setElementFrozen
- setElementHealth
- setElementID
- setElementInterior
- setElementModel
- setElementParent
- setElementPosition
- setElementRotation
- setElementVelocity
- setLowLODElement
- getPedContactElement
- getResourceDynamicElementRoot
- getResourceRootElement