AR/isElement: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (Created page with "==Syntax== <syntaxhighlight lang="lua"> bool isElement ( var theValue ) </syntaxhighlight>  ===Required Arguments=== * '''theValue: الشيئ الذي تريد فحصه اذا كان موجود'''   =...")  | 
				 (→مثال)  | 
				||
| (6 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
==  | هذه الوظيفة تستخدم لفحص اذا كان العنصر موجود او غير موجود  | ||
==تركيب الجملة البرمجية==  | |||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
bool isElement ( var theValue )  | bool isElement ( var theValue )  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
===  | ===العناصر المطلوبة===  | ||
* '''theValue: الشيئ الذي تريد فحصه اذا كان موجود  | * '''theValue:''' الشيئ الذي تريد فحصه اذا كان موجود  | ||
===Returns===  | ===Returns===  | ||
Returns اذا كان العنصر غير موجود false اذا كان العنصر موجوده, قيمة true قيمة  | Returns اذا كان العنصر غير موجود false اذا كان العنصر موجوده, قيمة true قيمة  | ||
==  | ==مثال==  | ||
<section name="كلنت" class="client" show="true">  | |||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
local myMarker = createMarker(-2407.69531,-594.49060,132.64844, "arrow", 2, 255, 255, 255, 255)  | local myMarker = createMarker(-2407.69531,-594.49060,132.64844, "arrow", 2, 255, 255, 255, 255) -- انشاء ماركر  | ||
function isTheElement()  | function isTheElement() -- انشاء وظيفة  | ||
if isElement(myMarker) then  | if isElement(myMarker) then -- التحقق اذا ما كان الماركر عنصر  | ||
outputChatBox("العنصر موجود")  | outputChatBox("العنصر موجود")    | ||
else  | else -- اذا لم يتحقق الشرط  | ||
outputChatBox("لم يتم ايجاد العنصر")  | outputChatBox("لم يتم ايجاد العنصر")  | ||
end  | end -- اغلاق التحقق  | ||
end  | end -- اغلاق الوظيفة  | ||
addCommandHandler("element", isTheElement)  | addCommandHandler("element", isTheElement) -- انشاء امر عند كتابته تفعل الوظيفة  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
</section>  | |||
==  | ==أنظر أيضا==  | ||
{{Element functions}}  | {{Element functions}}  | ||
Latest revision as of 03:07, 29 March 2018
هذه الوظيفة تستخدم لفحص اذا كان العنصر موجود او غير موجود
تركيب الجملة البرمجية
bool isElement ( var theValue )
العناصر المطلوبة
- theValue: الشيئ الذي تريد فحصه اذا كان موجود
 
Returns
Returns اذا كان العنصر غير موجود false اذا كان العنصر موجوده, قيمة true قيمة
مثال
Click to collapse [-]
كلنتlocal myMarker = createMarker(-2407.69531,-594.49060,132.64844, "arrow", 2, 255, 255, 255, 255) -- انشاء ماركر
function isTheElement() -- انشاء وظيفة
if isElement(myMarker) then -- التحقق اذا ما كان الماركر عنصر
outputChatBox("العنصر موجود") 
else -- اذا لم يتحقق الشرط
outputChatBox("لم يتم ايجاد العنصر")
end -- اغلاق التحقق
end -- اغلاق الوظيفة
addCommandHandler("element", isTheElement) -- انشاء امر عند كتابته تفعل الوظيفة
أنظر أيضا
- 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