AR/getSoundMaxDistance

From Multi Theft Auto: Wiki
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.

هذه الوظيفة تقوم بإحضار المسافه القصوى لتوقف الصوت.

تركيب الوظيفة

int getSoundMaxDistance ( element sound )

الفرغات المطلوبة

  • الصوت: متغير الصوت.

المعطيات

  • تعطي عدد صحيح لمسافة القصوي
  • تعطي false اذا لم تنجح

مثال

هذا المثال يقوم بإحضار المسافه القصوى للصوت في الشات عند كتابة هذا الامر /getmaxdistance

Click to collapse [-]
Client
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true) -- تشغيل صوت في مكان معين

function getmaxdistanceFunc() -- إنشاء الوظيفه
  outputChatBox("مسافة الحد الاقصي: "..getSoundMaxDistance(sound)) -- إخراج المسافة القوصى للصوت في الشات
end -- إغلاق للوظيفه
addCommandHandler("getmaxdistance", getmaxdistanceFunc) -- إضافة آمر معالج للوظيفة

أنظر أيضاً