AudioClient

playSoundFrontend

PLAY_SOUND_FRONTEND0x67C540AA08E4A6F5

The GTA V native PLAY_SOUND_FRONTEND of the AUDIO namespace, as LS:MP client scripts call it: the global function playSoundFrontend, in JavaScript and in Lua.

SignatureJavaScript
playSoundFrontend(
  soundId: number,
  audioName: string,
  audioRef: string,
  p3: boolean
): void
SignatureLua
playSoundFrontend(
  soundId: integer,
  audioName: string,
  audioRef: string,
  p3: boolean
)

Usage

JavaScript
playSoundFrontend(soundId, audioName, audioRef, p3);
Lua
playSoundFrontend(soundId, audioName, audioRef, p3)

Parameters

ParameterTypeJavaScriptLua
soundIdintnumberinteger
audioNamestringstringstring
audioRefstringstringstring
p3BOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

List: https://pastebin.com/DCeRiaLJ

All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM

Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json

Reference

Namespace
Audio AUDIO
In the game
void PLAY_SOUND_FRONTEND(int soundId, const char* audioName, const char* audioRef, BOOL p3)
Hash
0x67C540AA08E4A6F5

Open in the interactive natives reference