AudioClient

requestScriptAudioBank

REQUEST_SCRIPT_AUDIO_BANK0x2F844A8B08D76685

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

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

Usage

JavaScript
const result = requestScriptAudioBank(audioBank, p1, p2);
Lua
local result = requestScriptAudioBank(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/AkmDAVn6
Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json
p2 is always -1

Reference

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

Open in the interactive natives reference