# playSoundFrontEnd (Server)

> Plays a game interface sound for a player, or for every player inside an element, such as `root`.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Players and accounts
- **URL**: https://wiki.mymp.gg/en/playSoundFrontEnd-server
- **Counterpart**: Also exists on the client, with its own implementation: [playSoundFrontEnd (Client)](https://wiki.mymp.gg/en/playSoundFrontEnd-client.md)

## Syntax

```lua
bool playSoundFrontEnd(element element, int sound)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `element` | `element` | A player, or an element whose child players hear the sound. |
| `sound` | `int` | The sound id, from 0 to 101. |

## Returns

`true` if `element` is a player. With any other element the sound reaches the players inside it but the function returns `false`; also `false` if the sound is outside 0 to 101.

## Example

```lua
addEventHandler("onPlayerJoin", root, function()
    playSoundFrontEnd(root, 1)
end)
```

## See also

- [playSoundFrontEnd (Client)](https://wiki.mymp.gg/en/playSoundFrontEnd-client.md): Plays one of GTA San Andreas's interface sounds, such as the menu and mission ones.
- [getPlayers (Server)](https://wiki.mymp.gg/en/getPlayers.md): Lists every player on the server.
