<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=PlaySound3D</id>
	<title>PlaySound3D - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=PlaySound3D"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=PlaySound3D&amp;action=history"/>
	<updated>2026-09-19T06:25:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=PlaySound3D&amp;diff=877&amp;oldid=prev</id>
		<title>QCherry: Document expanded scripting capacities and complete audited limits for 0.1.3 BUILD81</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=PlaySound3D&amp;diff=877&amp;oldid=prev"/>
		<updated>2026-09-12T11:51:50Z</updated>

		<summary type="html">&lt;p&gt;Document expanded scripting capacities and complete audited limits for 0.1.3 BUILD81&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:51, 12 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l54&quot;&gt;Line 54:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 54:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The native player transform is sampled for the listener only while at least one spatial sound exists; this path does not use Angelscript and does not install a ProcessEvent hook.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The native player transform is sampled for the listener only while at least one spatial sound exists; this path does not use Angelscript and does not install a ProcessEvent hook.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The same declaration, path, integrity, codec, ownership, and active-sound limits as &amp;lt;code&amp;gt;playSound&amp;lt;/code&amp;gt; apply.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The same declaration, path, integrity, codec, ownership, and active-sound limits as &amp;lt;code&amp;gt;playSound&amp;lt;/code&amp;gt; apply.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Expanded limits apply from update 0.1.3 BUILD81. Client limits: 128 owned sounds per resource and 512 globally. See [[Scripting limits]]; earlier 0.1.3 binaries retain their old limits.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua Functions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Lua Functions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Client Functions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Client Functions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Audio Functions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Audio Functions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=PlaySound3D&amp;diff=770&amp;oldid=prev</id>
		<title>QCherry: Document client audio API for update 0.1.2</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=PlaySound3D&amp;diff=770&amp;oldid=prev"/>
		<updated>2026-09-04T19:28:59Z</updated>

		<summary type="html">&lt;p&gt;Document client audio API for update 0.1.2&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= playSound3D =&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; font-weight:bold; letter-spacing:0.04em;&amp;quot;&amp;gt;AVAILABLE FROM UPDATE 0.1.2&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; margin-top:0.25rem;&amp;quot;&amp;gt;This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Starts a positional OGG Vorbis sound at a world position owned by the current client resource.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
number|false playSound3D(string relativePath, number x, number y, number z [, bool looped = false, number volume = 1, number minDistance = 1, number maxDistance = 50])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;relativePath&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || The exact relative path of a same-resource &amp;lt;code&amp;gt;&amp;amp;lt;file download=&amp;quot;join&amp;quot;&amp;amp;gt;&amp;lt;/code&amp;gt; entry ending in &amp;lt;code&amp;gt;.ogg&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || yes || World X coordinate in metres.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || yes || World Y coordinate in metres.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || yes || World Z coordinate in metres.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;looped&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt; || no || Whether playback should loop; defaults to false.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;volume&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || no || Initial linear volume from 0 to 1; defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;minDistance&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || no || Distance in metres at or below which the sound retains full volume; defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;maxDistance&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || no || Distance in metres at or beyond which the sound is silent; defaults to 50.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns a non-zero resource-owned sound handle, or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; when validation, integrity verification, decoding, or playback setup fails.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Play a looping forge sound in the world:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
local forge = playSound3D(&lt;br /&gt;
    &amp;quot;sounds/forge.ogg&amp;quot;,&lt;br /&gt;
    125.5, -48.0, 3.25,&lt;br /&gt;
    true, 0.8, 2.0, 45.0&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Available only in client-side resource scripts.&lt;br /&gt;
* Coordinates and attenuation distances use metres. Coordinates must be finite and remain within +/-1,000,000 metres on every axis.&lt;br /&gt;
* The minimum distance must be at least 0.01 metres. The maximum must be greater than the minimum and no greater than 10,000 metres.&lt;br /&gt;
* Positional audio is downmixed to mono as a point source. It remains at full gain through &amp;lt;code&amp;gt;minDistance&amp;lt;/code&amp;gt;, fades linearly, and is silent at and beyond &amp;lt;code&amp;gt;maxDistance&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Resource audio uses the normal Windows default playback endpoint. The communications-device selection is reserved for voice microphone capture and does not reroute 3D playback.&lt;br /&gt;
* The native player transform is sampled for the listener only while at least one spatial sound exists; this path does not use Angelscript and does not install a ProcessEvent hook.&lt;br /&gt;
* The same declaration, path, integrity, codec, ownership, and active-sound limits as &amp;lt;code&amp;gt;playSound&amp;lt;/code&amp;gt; apply.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Functions]]&lt;br /&gt;
[[Category:Client Functions]]&lt;br /&gt;
[[Category:Audio Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>