From Multi Theft Auto: Wiki
Jump to navigation
Jump to search
|
|
| Line 1: |
Line 1: |
| __NOTOC__
| |
| {{Client function}}
| |
|
| |
|
| [[sound]] تستخدم هذه الوظيفة في أيقاف صوت محدد
| |
|
| |
| ==شرح الوظيفة==
| |
| <syntaxhighlight lang="lua">bool stopSound ( element theSound )</syntaxhighlight>
| |
|
| |
| ===العناصر المطلوبة===
| |
| *'''theSound:''' [[sound]] أسم الصوت المطلوب إيقافة.
| |
|
| |
| ===أستعادة===
| |
| *'''Returns:''' ''true'' اذا تم ايقاف الصوت بنجاح, ''false'' اذا لم ينجح.
| |
|
| |
| ===مثال===
| |
| <section name="Client" class="client" show="true">
| |
| <syntaxhighlight lang="lua">function startMySound() -- الوظيفة
| |
| sound = playSound( "sound.mp3", true ) -- بدأ تشغيل الصوت
| |
| end -- إغلاق الوظيفة
| |
| addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), startMySound ) -- حدث بداية السكربت لتشغيل وضيفة الصوت
| |
|
| |
| function stopMySound() -- الوظيفة
| |
| stopSound( sound ) -- إيقاف الصوت
| |
| end -- إغلاق الوظيفة
| |
| addCommandHandler ( "stopsound", stopMySound ) -- الأمر المستخدم لتنفيذ وظيفة ايقاف الصوت</syntaxhighlight>
| |
| </section>
| |
|
| |
| ==أنظر أيضاً==
| |
| {{AR/Audio_functions}}
| |
Revision as of 15:52, 31 March 2016