playSound
PLAY_SOUND0x7FF4944CC209192DThe 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.
playSound(
soundId: number,
audioName: string,
audioRef: string,
p3: boolean,
p4: any,
p5: boolean
): voidplaySound(
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
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
soundId | int | number | integer |
audioName | string | string | string |
audioRef | string | string | string |
p3 | BOOL | boolean | boolean |
p4 | Any | any | any |
p5 | BOOL | boolean | boolean |
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