AR/getElementColShape

From Multi Theft Auto: Wiki
(Redirected from AR/GetElementColShape)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


colshape هذه الوظيفة تستخدم لجلب كائنات

Syntax(تركيب الجمله(الوظيفه

colshape getElementColShape ( element theElement )          

(Required Arguments)الفراغات المطلوبة

  • theElement: منهcolshapeالكائن الذي تريد جلب الـ

(Returns)المعطيات

falseاذا كانت احدى الفراغات خاطئه يعطي, colshape يعطي كائن

مثال

Click to collapse [-]
Server

.و يضيف امر للتحقق اذا كنت واقفاً عليه Toreno داخل بيت(marker)هذا المثال يقوم بإنشاء علامة

theMarker = createMarker( -687.9, 937.8, 13.6, "cylinder", 2.0, 255, 0, 0, 80 ) -- Toreno انشاء علامة اسطوانية داخل منزل

function checkOnMarker ( thePlayer )
    local isIn = isPlayerInMarker( thePlayer, theMarker ) -- تستخدم الوظيفه للتأكد اذا كان اللاعب داخل العلامة او لا
    if isIn then-- التأكد اذا كان داخل العلامه
        outputChatBox( "You are on the marker.", thePlayer )--(اللاعب)thePlayer اخراج الكلام بالدردشه لـ
    else--اذا لم يكن داخل العلامة
        outputChatBox( "You are not on the marker.", thePlayer )(اللاعب)thePlayer اخراج الكلام بالدردشه لـ
    end---اغلاق التأكد
end--checkOnMarker  اغلاق الوظيفه
addCommandHandler ( "amionmarker", checkOnMarker )--checkOnMarker اضافة امر للوظيفة

-- isPlayerInMarker (تعريف للدالة (الوظيفه
function isPlayerInMarker( thePlayer, theMarker )--isPlayerInMarker انشاء وظيفة بأسم
	local theShape = getElementColShape( theMarker ) --colshape جلب علامات
	if isElementWithinColShape( thePlayer, theShape ) then -- التأكد اذا كان اللاعب داخله 
		return true--true يعطي
	else -- هو ليس داخل العلامه
		return false--false يعطي
	end--إغلاق التأكد
end--isPlayerInMarkerاغلاق الوظيفه

انظر ايضاً الى