AR/playSound: Difference between revisions
Jump to navigation
Jump to search
آحمد آلعلَي (talk | contribs) (→مثــال) |
آحمد آلعلَي (talk | contribs) (→مثــال) |
||
Line 19: | Line 19: | ||
=='''مثــال'''== | =='''مثــال'''== | ||
<section name="كلنت" class="client" show="true"> | <section name="'''كلنت'''" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function wasted (killer, weapon, bodypart) | function wasted (killer, weapon, bodypart) |
Revision as of 11:52, 9 October 2013
sound إنشاء ملف صوت .
مـلاحـظـة: MP3, WAV, OGG, RIFF, MOD, XM, IT و S3M --- صـيـغـة ملف الـصـوت تـقـبـل فـقـط
Syntax
element playSound ( string soundPath, [ bool looped = false ] )
العناصر المطلوبة
- soundPath: هو ملف الصوت المراد تشغيله filepath / ( <file /> مع علامة meta.xml و يجب ان يكون ملف الصوت معرفا في )
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- looped: الحلقة غير متوفرة لتدفق الأصوات، فقط لملفات الصوت . true تمثل اذا كان سوف يحلق الصوت . لتكرار الصوت , استخدم boolean
Returns
Returns a sound element if the sound was successfully created, false otherwise.
مثــال
Click to collapse [-]
'''كلنت'''function wasted (killer, weapon, bodypart) local sound = playSound("sounds/wasted.mp3") -- wasted.mp3 نشغل الصوت - sounds من مجلد اسمه setSoundVolume(sound, 0.5) -- 50% نجعل حجم الصوت end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) -- نضع الايفنت الى هذه الوظيفه عند موت الاعب
أنظر أيضاً
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- playSoundFrontEnd
- setRadioChannel
- setSoundEffectEnabled
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd