# Playing custom sounds on a FiveM server

> Play sounds in FiveM: PlaySoundFrontend for the game's own set, NUI for your own .ogg files, xsound for positional audio, audio banks for engines and sirens.

Source: https://fam-tools.com/guides/fivem-custom-sounds · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 9 min

**Short answer.** For short UI and gameplay sounds, first try GTA’s own sounds with `PlaySoundFrontend(-1, name, set, true)`. For custom files, play `.ogg`/`.mp3` through NUI — the approach used by InteractSound-style resources — optionally with distance-based volume, or use a positional audio resource such as xsound. For sounds that must behave like game audio (sirens, engines, weapons), stream audio banks with `AUDIO_WAVEPACK` and related data files.

## Key points

- Built-in first: `PlaySoundFrontend` costs nothing to download.
- NUI audio is the simplest way to play your own files.
- Positional resources calculate volume from distance.
- Native audio banks for sirens, engines and weapons.
- Keep files short and compressed — everyone downloads them.

Door beeps, radio clicks, alarms, a custom siren: sound makes scripts feel finished. FiveM gives you three levels — reuse GTA’s built-in sounds, play audio files through the NUI browser, or stream real game audio banks — and each fits different jobs.

## Built-in GTA sounds

*client.lua*

```lua
PlaySoundFrontend(-1, 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
PlaySoundFrontend(-1, 'CHECKPOINT_PERFECT', 'HUD_MINI_GAME_SOUNDSET', true)
```

Thousands of sound/set name pairs exist in the game; community lists collect them. They need no download and respect the player’s game volume.

## Custom files through NUI

*client.lua*

```lua
RegisterNetEvent('sound:play', function(file, volume)
    SendNUIMessage({ action = 'play', file = file, volume = volume or 0.4 })
end)
```

*html/app.js*

```js
window.addEventListener('message', ({ data }) => {
  if (data.action !== 'play') return;
  const a = new Audio(`./sounds/${data.file}.ogg`);
  a.volume = Math.min(1, Math.max(0, data.volume));
  a.play();
});
```

List the sound files in the fxmanifest `files`. For sounds others should hear nearby, the server triggers the event for players within range and scales volume by distance — which is what positional audio resources automate.

## Native audio banks

Sirens, engine sounds and gunshots that should use the game’s audio engine are streamed as wave packs (`.awc`) with audio data (`.rel`) declared as `AUDIO_WAVEPACK`, `AUDIO_GAMEDATA` and `AUDIO_SOUNDDATA`. Weapons are covered in [weapon sounds](https://fivem-weapons.com/guides/fivem-addon-weapon-sounds); vehicles reference audio through `audioNameHash` in vehicles.meta — see [vehicle meta files](https://fam-tools.com/guides/fivem-vehicle-meta-files).

## Formats and etiquette

- `.ogg` at a modest bitrate; mono for effects.
- Short files — every player downloads them.
- Default volumes low; loud sounds get resources removed.
- Only sounds you have rights to.

## Questions

### How do I play a custom sound in FiveM?

Play an audio file through NUI (an InteractSound-style resource) or use a positional audio resource; for game-integrated audio stream native audio banks.

### How do I play built-in GTA sounds?

`PlaySoundFrontend(-1, soundName, soundSetName, true)` with a valid name and set.

### How do I make a sound only nearby players hear?

Trigger it for players within a radius and scale volume by distance, or use a positional audio resource.

### What format should sound files use?

Compressed `.ogg` (or `.mp3`), short and mono where possible.

## Related

- https://fam-tools.com/guides/fivem-native-audio-banks
- https://fam-tools.com/guides/fivem-vehicle-meta-files
- https://fam-tools.com/guides/fivem-oversized-assets-warning
- https://fam-tools.com/guides/fivem-add-addon-cars
- https://fam-tools.com/guides/fivem-too-many-resources
