AudioClient

playSound

PLAY_SOUND0x7FF4944CC209192D

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

SignatureJavaScript
playSound(
  soundId: number,
  audioName: string,
  audioRef: string,
  p3: boolean,
  p4: any,
  p5: boolean
): void
SignatureLua
playSound(
  soundId: integer,
  audioName: string,
  audioRef: string,
  p3: boolean,
  p4: any,
  p5: boolean
)

Usage

JavaScript
playSound(soundId, audioName, audioRef, p3, p4, p5);
Lua
playSound(soundId, audioName, audioRef, p3, p4, p5)

Parameters

ParameterTypeJavaScriptLua
soundIdintnumberinteger
audioNamestringstringstring
audioRefstringstringstring
p3BOOLbooleanboolean
p4Anyanyany
p5BOOLbooleanboolean

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.

All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/A8Ny8AHZ

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(int soundId, const char* audioName, const char* audioRef, BOOL p3, Any p4, BOOL p5)
Hash
0x7FF4944CC209192D

Open in the interactive natives reference