Audio::triggerMusicEvent

From RAGE Multiplayer Wiki
Revision as of 17:41, 12 October 2021 by Shr0x (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: pastebin.com/RzDFmB1W

All music event names found in the b617d scripts: pastebin.com/GnYt0R3P

Syntax

mp.game.audio.triggerMusicEvent(eventName);

Required Arguments

  • eventName: String

Return value

  • Boolean
Client-Side
mp.game.audio.triggerMusicEvent('AH3B_DOOR_52'); //play a provided music in the pastebin link above 
setTimeout(() => {
    mp.game.audio.triggerMusicEvent('GLOBAL_KILL_MUSIC'); //stop the music after 5 seconds
}, 5000);
 

See also