AR/playSound: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
آحمد آلعلَي (talk | contribs)  (→مثــال)  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
__NOTOC__    | __NOTOC__    | ||
{{Client function}}  | {{Client function}}  | ||
.هذه الوظيفة تصنع صوتاً وتشغله فوراً بعد الصنع  | |||
MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M :الصيغات المدعومة هي التالي :t'''ملاحظة'''  | |||
==Syntax==    | ==Syntax==    | ||
| Line 13: | Line 13: | ||
===Optional Arguments===    | ===Optional Arguments===    | ||
{{OptionalArg}}    | {{OptionalArg}}    | ||
*'''looped:'''   | *'''looped:''' ([[Boolean]]) false او true هذه الخاصية تتمثل في سواء اكان الصوت متكرر او لا باستخدام  | ||
===Returns===  | ===Returns===  | ||
اذا لم يتم صنع الصوت بنجاح false تنتج صوتاً اذا تم صنع الصوت بنجاح, أو تنتج  | |||
=='''مثــال'''==    | =='''مثــال'''==    | ||
Revision as of 01:44, 6 November 2013
.هذه الوظيفة تصنع صوتاً وتشغله فوراً بعد الصنع
MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M :الصيغات المدعومة هي التالي :tملاحظة
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: (Boolean) false او true هذه الخاصية تتمثل في سواء اكان الصوت متكرر او لا باستخدام
 
Returns
اذا لم يتم صنع الصوت بنجاح false تنتج صوتاً اذا تم صنع الصوت بنجاح, أو تنتج
مثــال
Click to collapse [-]
Clientfunction 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