AR/setElementPosition: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} هذه الوظيفة تستخدم لنقل الالمنت او الشيئ لاحداثيات محددة. <div style="background: #FF7070...") |
No edit summary |
||
Line 111: | Line 111: | ||
==See Also== | ==See Also== | ||
{{Element functions}} | {{AR/Element functions}} |
Latest revision as of 16:20, 17 April 2016
هذه الوظيفة تستخدم لنقل الالمنت او الشيئ لاحداثيات محددة.
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