<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dante383+d</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dante383+d"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Dante383_d"/>
	<updated>2026-04-26T07:20:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSoundPosition&amp;diff=68415</id>
		<title>SetSoundPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSoundPosition&amp;diff=68415"/>
		<updated>2021-01-24T18:49:21Z</updated>

		<summary type="html">&lt;p&gt;Dante383 d: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to change the seek position of the specified [[sound]] element.&lt;br /&gt;
Use a player element to control a players voice with this function.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
*To set position of a remote audio file you have to pause it first, then set the position and then unpause it.}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setSoundPosition ( element theSound, float pos )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:setPlaybackPosition|playbackPosition|getSoundPosition}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theSound:''' the [[sound]] element which seek position you want to modify.&lt;br /&gt;
*'''pos:''' a [[float]] value representing the new seek position of the [[sound]] element in seconds.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the [[sound]] element's seek position was successfully changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example allows the player to set how many milliseconds into the song he wants it to play from&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
theSound = playSound(&amp;quot;music/song.mp3&amp;quot;)&lt;br /&gt;
function setSongPos(cmd, tm)&lt;br /&gt;
    tm = tonumber(tm)&lt;br /&gt;
    local ssp = setSoundPosition(theSound,tm)&lt;br /&gt;
    if ssp then&lt;br /&gt;
        outputChatBox(&amp;quot;Sound is now playing from: &amp;quot;..tostring(tm))&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox(&amp;quot;An error has occured.&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;skipsong&amp;quot;, setSongPos)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element for voice control}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[hu:setSoundPosition]]&lt;br /&gt;
[[ar:setSoundPosition]]&lt;br /&gt;
[[ro:setSoundPosition]]&lt;/div&gt;</summary>
		<author><name>Dante383 d</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundMetaTags&amp;diff=68414</id>
		<title>GetSoundMetaTags</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundMetaTags&amp;diff=68414"/>
		<updated>2021-01-24T18:48:37Z</updated>

		<summary type="html">&lt;p&gt;Dante383 d: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
*This function does not work on remote WAV files&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundMetaTags ( element sound [, string format = &amp;quot;&amp;quot; ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
{{OOP||[[sound]]:getMetaTags}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' a [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''format:''' a filter [[string]] to get a specific meta tag.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[table]], but only a [[string]] if '''format''' is given, with all data available (keys are listed below) for the sound if successful, ''false'' otherwise. If any data is unavailable then the associated key is not written to the table.&lt;br /&gt;
&lt;br /&gt;
{{Sound_Meta_Tags}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;addEventHandler(&amp;quot;onClientSoundFinishedDownload&amp;quot;,root,function(length)&lt;br /&gt;
	local meta = getSoundMetaTags(source)&lt;br /&gt;
	outputChatBox(&amp;quot;The sound: &amp;quot;..(meta.title)..&amp;quot; has finished in :&amp;quot;..length..&amp;quot;ms.&amp;quot;)&lt;br /&gt;
        outputChatBox(&amp;quot;The sound meta tags: Artist:&amp;quot;..(meta.artist)..&amp;quot; Album:&amp;quot;..(meta.album)..&amp;quot; Genre:&amp;quot;..(meta.genre)..&amp;quot; Year:&amp;quot;..(meta.year)..&amp;quot; Comment:&amp;quot;..(meta.comment)..&amp;quot; Track:&amp;quot;..(meta.track)..&amp;quot; Composer:&amp;quot;..(meta.composer)..&amp;quot; Copyright:&amp;quot;..(meta.copyright)..&amp;quot; SubTitle:&amp;quot;..(meta.subtitle)..&amp;quot; Album Artist:&amp;quot;..(meta.album_artist)..&amp;quot;.&amp;quot;)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
&lt;br /&gt;
[[HU:getSoundMetaTags]]&lt;br /&gt;
[[AR:getSoundMetaTags]]&lt;br /&gt;
[[RO:getSoundMetaTags]]&lt;/div&gt;</summary>
		<author><name>Dante383 d</name></author>
	</entry>
</feed>