[QBCore/ESX] in Game Music (soundtrack)
Sinor In-Game Music This resource automatically plays music when a player loads into the server, with options for random or sequential playback. It supports both QBCore and ESX frameworks and allows full configuration Features Automatic music playback when a player logs in. Continuous playlist...
forum.cfx.re
Sinor 游戏音乐
当播放器加载到服务器时,此资源会自动播放音乐,可选择随机或顺序播放。它支持 QBCore 和 ESX 框架,并允许完全配置特征
- 当玩家登录时自动播放音乐。
- 连续播放列表循环,可选择随机或有序播放。
- 可配置音量和播放设置。
- 使用游戏内命令进行手动控制。
依赖项
- 需要 QBCore 或 ESX 框架。
配置
lua:
Config = {}
Config.Framework = "QBCore" -- Choose either 'ESX' or 'QBCore'
Config.PlayMusicOnPlayerLoaded = true -- Set to true to play music when the player loads
Config.DefaultVolume = 0.5 -- Volume level between 0.1 and 1.0
Config.PlayMusicMode = "random" -- Options: 'random' or 'order'
Config.CommandToPlay = "playmusic" -- Command to manually start the music (can still be used if needed)
Config.CommandToStop = "stopmusic" -- Command to stop the music
Config.DebugPrint = true -- Set to true to enable debug printing, false to disable
Config.MusicList = {
"nui://Sinor-InGameMusic/html/song1.mp3",
"nui://Sinor-InGameMusic/html/song2.mp3",
-- Add more songs as needed
}