AR/setSoundPaused

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.

مؤقت ( sound ) تستخدم هذه الدالة لأيقاف او الغاء ايقاف العنصر

( يمكن استخدام هاذه الوضيفة لللآعبين ( اسكات الاعب

Syntax

bool setSoundPaused ( element theSound, bool paused )

العناصر المطلوبة

  • theSound: . المراد ايقافه او الغاء ايقافه مؤقت sound الصوت
  • paused: boolean الحالة المطلوبة ايقاف \ الغاء الأيقاف

Returns

  • Returns: true sound اذا نجحت الوضيفة في الأيقاف او الغاء ايقاف الصوت, false لم تنجح.

Example

هذه المثال سيكون فيه ايقاف و الغاء الأيقاف المؤقت

Click to collapse [-]
Client
theSound = playSound("music/song.mp3", true) -- الصوت
function togglePausedSound() -- وضيفة
    if(isSoundPaused(theSound)) then -- اذا كان متوقف مؤقتاً
        setSoundPaused(theSound, false) -- تشغيل الصوت
    else -- اذا لم يكن متوقف
        setSoundPaused(theSound, true) -- ايقاف الصوت
    end -- اغلآق الشرط
end -- اغلاق الوضيفة
addCommandHandler("pausesound", togglePausedSound) -- امر الأيقاف او الغاء الأيقاف

التحديث

Version Description
1.3.2 يمكن التحكم باصوات اللآعبين ايقاف \ الغاء الأيقاف

أنظر أيضاً