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 cycling with options for random or ordered playback.
- Configurable volume and playback settings.
- Manual control with in-game commands.
Dependencies
- Requires QBCore or ESX framework.
Config
DownloadConfig = {}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.0Config.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}