[RELEASE] [PAID] Car Music Player Script (w/ Logs) [QBCore]

A script by NadPlayz

No reviews yet.
[RELEASE] [PAID] Car Music Player Script (w/ Logs) [QBCore] main image

Full Description

Hey everyone! This is a script that allows players on your FiveM server to jam out to music with their friends and with a beautiful custom-made UI (NUI). It also has a detailed logging feature which logs to a file and/or server console (configurable) whenever a player plays music with a direct link to the song, which makes it easy to moderate the usage of the radio. I hope you all enjoy and find this useful for the players on your server! :notes:

Features:
↳ Logs
↳ Extensive configuration
↳ Play/pause, rewind/fast forward, stop, volume control functions
↳ Video thumbnail & title
↳ Music timestamp
↳ Music synced across all clients
↳ Spatial/3D audio
… and even more coming in future updates!

Dependencies:
QBCore Framework
xSound
YouTube Data API Key (This is completely free - tutorial on how to get a key is included in the README)

Buy ($10):
Tebex

Showcase:

Watch Car Music Radio Script (w/ Logs) | @NadPlayz | Streamable (Try this link if preview does not work)

Configuration:

Config = {}
Locale = {}

-- [[ 🟢 Configuration 🟢 ]] --

-- QBCore
Config.qbVersion = 'new' -- Change to 'new' if you are using the new QBCore version. If you do not, core functions of the script will simply not work!

-- General
Config.ytAPIKey = "" -- YouTube API key is used to get the thumbnail and video name. Instructions: https://bit.ly/3lAPorQ. Do not hesitate to join my Discord for support.
Config.musicDistance = 3 -- How far you can be from the vehicle and still be able to hear the music
Config.defaultImage = "https://i.imgur.com/T1rEs73.jpg" -- Default image displayed on the radio when no music is playing
Config.refreshRate = 100 -- Lower = better quality but worse performance (100 is a good balance)

-- Logs
Config.enableLogs = true -- Change this to false if you want to disable logs
Config.logToFile = true -- Change this to false if you do not want to log to a file // NOTE: Must have a 'log.txt' file in the resource folder.
Config.printToConsole = true -- Change this to false if you do not want every event to print to server console
Config.logToDiscord = false -- Change this to true and set the webhook URL below if you want every event to be sent to a Discord webhook
Config.discordWebhook = "" -- Make sure to set the above option to true if you wish to send logs to Discord

-- [[ 🔴 Configuration 🔴 ]] --


-- [[ 🟢 Locale 🟢 ]] --

-- General
Locale.nothingPlaying = "NOTHING PLAYING"
Locale.songURL = "Song URL (YouTube)"

-- Notifications
Locale.radioInUse = "Your radio is in use in another vehicle"

-- Logs
Locale.radio = "Vehicle Radio"
Locale.played = " played "

-- [[ 🔴 Locale 🔴 ]] --

Note:
Protected by FiveM Asset Escrow system.

If you have any questions, please feel free to message me here - I would be more than happy to help. I appreciate feedback and constructive criticism. Thank you! :heart: