AR/getSoundPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(getSoundPosition)
 
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
This function is used to return the current seek position of the specified [[sound]] element.
هذه الداله يتم استخدامها لأحضار مكان الصوت.
{{New_feature|3.0139|1.3.2|
{{New_feature|3.0139|1.3.2|
If the element is a player, this function will use the players voice.
اذا كن العنصر لاعب, هذه الداله ستستخدم صوت الاعب.
}}
}}
==Syntax==  
==Syntax==  
Line 9: Line 9:


===Required Arguments===  
===Required Arguments===  
*'''theSound:''' The [[sound]] element which seek position you want to return.
*'''theSound:''' اسم الصوت الذي تريد معرفة مكانه.


===Returns===
===Returns===
Returns a [[float]] value indicating the seek position of the [[sound]] element in seconds.
ارجاع القيمه [[float]] مما يدل على مكان العنصر [[sound]] في ثواني.


==Example==  
==Example==  
Plays a sound then outputs the seek position.
تشغيل الصوت ثم معرفة مكان الصوت
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local sound = playSound("randomSound.mp3",false) --Play a sound
local sound = playSound("randomSound.mp3",false) --تشغيل الصوت
local soundPosition = getSoundPosition(sound) --Get the current sound position
local soundPosition = getSoundPosition(sound) -- احضار مكا ن الصوت
outputChatBox("The current seek position of the sound is: " .. soundPosition .. ".")
outputChatBox("مكان الصوت هو: " .. soundPosition .. ".")
</syntaxhighlight>
</syntaxhighlight>


==Changelog==
==Changelog==
{{ChangelogHeader}}
{{ChangelogHeader}}
{{ChangelogItem|1.3.2|Added player element to use a players voice}}
{{ChangelogItem|1.3.2|اضافة عنصر الاعب لأستخدام صوت الاعب}}
 
 
 
 
'''By The Killer.'''


==أنظر أيضاً==
==أنظر أيضاً==
{{AR/Audio_functions}}
{{AR/Audio_functions}}

Revision as of 17:50, 3 January 2014

هذه الداله يتم استخدامها لأحضار مكان الصوت. اذا كن العنصر لاعب, هذه الداله ستستخدم صوت الاعب.

Syntax

float getSoundPosition ( element theSound )

Required Arguments

  • theSound: اسم الصوت الذي تريد معرفة مكانه.

Returns

ارجاع القيمه float مما يدل على مكان العنصر sound في ثواني.

Example

تشغيل الصوت ثم معرفة مكان الصوت

local sound = playSound("randomSound.mp3",false) --تشغيل الصوت
local soundPosition = getSoundPosition(sound) -- احضار مكا ن الصوت
outputChatBox("مكان الصوت هو: " .. soundPosition .. ".")

Changelog

Version Description
1.3.2 اضافة عنصر الاعب لأستخدام صوت الاعب



By The Killer.

أنظر أيضاً