Your own sounds and music
Like interact-sound or xsound: any sound file you put in rlx_ui/web/sounds/ (.ogg, .mp3, .wav), or an https:// URL (a radio stream, a song). Positional sounds follow their source and fade with the distance, for everyone near.
lua
RLX.PlayAudio(source, { sound = "notify.ogg", volume = 0.6 }) -- for one player (your own file)
RLX.PlayAudio(-1, { sound = "lockpick.ogg", player = source, range = 10 }) -- follows a player, heard around
local id = RLX.PlayAudio(-1, { id = "bank_alarm", sound = "alarm.wav", loop = true,
coords = { x = 150.0, y = -1040.0, z = 29.0 }, range = 60, volume = 0.8 }) -- or entity = netId
RLX.SetAudioVolume(id, 0.3) RLX.StopAudio(id)rlx_ui ships alarm.wav (a loop) as an example. For short interface sounds, the game's own are often better: RLX.PlaySoundFor(source, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET"). A loop for everyone is also played to players who join later. Without the rlx_ui page (or your own ui resource listening to rlx:ui:audio), nothing plays.