AudioClient

requestAmbientAudioBank

REQUEST_AMBIENT_AUDIO_BANK0xFE02FFBED8CA9D99

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

SignatureJavaScript
requestAmbientAudioBank(audioBank: string, p1: boolean, p2: any): boolean
SignatureLua
requestAmbientAudioBank(audioBank: string, p1: boolean, p2: any): boolean

Usage

JavaScript
const result = requestAmbientAudioBank(audioBank, p1, p2);
Lua
local result = requestAmbientAudioBank(audioBank, p1, p2)

Parameters

ParameterTypeJavaScriptLua
audioBankstringstringstring
p1BOOLbooleanboolean
p2Anyanyany

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/XZ1tmGEz
Full list of ambient audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientAudioBankNames.json
p2 is always -1

Reference

Namespace
Audio AUDIO
In the game
BOOL REQUEST_AMBIENT_AUDIO_BANK(const char* audioBank, BOOL p1, Any p2)
Hash
0xFE02FFBED8CA9D99

Open in the interactive natives reference