AudioClient

cancelMusicEvent

CANCEL_MUSIC_EVENT0x5B17A90291133DA5

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

SignatureJavaScript
cancelMusicEvent(eventName: string): boolean
SignatureLua
cancelMusicEvent(eventName: string): boolean

Usage

JavaScript
const result = cancelMusicEvent(eventName);
Lua
local result = cancelMusicEvent(eventName)

Parameters

ParameterTypeJavaScriptLua
eventNamestringstringstring

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 music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P
Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json

Reference

Namespace
Audio AUDIO
In the game
BOOL CANCEL_MUSIC_EVENT(const char* eventName)
Hash
0x5B17A90291133DA5

Open in the interactive natives reference