# getSoundMaxDistance (Shared)

> Returns the distance at which a 3D sound goes silent.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Sound
- **URL**: https://wiki.mymp.gg/en/getSoundMaxDistance

## Syntax

```lua
float|false getSoundMaxDistance(sound sound)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `sound` | `sound` | The `sound` element. On the client a `dui` element also works, for the browser's sound. |

## Returns

The distance in metres, or `false` if the sound was not found.

## Example

```lua
outputDebugString("Heard up to " .. getSoundMaxDistance(siren) .. " m")
```

## See also

- [setSoundMaxDistance (Shared)](https://wiki.mymp.gg/en/setSoundMaxDistance.md): Sets the distance at which a 3D sound goes silent. The default is 20 m. On the server, the change is sent to every client.
- [getSoundMinDistance (Shared)](https://wiki.mymp.gg/en/getSoundMinDistance.md): Returns how far a 3D sound plays at full volume.
