Advertisement
Caldryk

shared_settings.lua

Oct 26th, 2023
938
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.55 KB | None | 0 0
  1. JukeBox.Settings = {}
  2. JukeBox.Colours = {}
  3.  
  4. --| GENERAL SETTINGS |------------------------------------------------------------------------------------
  5. -- This decides whether new players should be bale to hear the JukeBox or not
  6. -- This option only sets a config for new players on first join and they can enable the JukeBox themselves after.
  7. JukeBox.Settings.DefaultEnabled = true
  8.  
  9. -- Use this to make sure when ANYONE joins the server the JukeBox is off by default, even if they've used it before.
  10. -- This may be useful for gamemodes where the JukeBox mak be intrusive.
  11. JukeBox.Settings.DisabledOverride = false
  12.  
  13. -- This sets whether downloads should be done via workshop or FastDL
  14. -- If set to false, the files within the "materials" folder should be put on your FastDL
  15. JukeBox.Settings.UseWorkshop = true
  16.  
  17. -- This is the URL to the YouTube player HTML page provided.
  18. -- The link provided should work, this shouldn't need changing
  19. JukeBox.Settings.PlayerURL = "http://botdan.com/JukeBox/VideoPlayer/V4/index.html"
  20. -- [NOTE] PLEASE DON'T CHANGE THIS CURRENTLY, AS THIS LINK WILL HAVE THE MOST
  21. --        UP-TO-DATE VERSION OF THE WEB PLAYER, WHICH MAY PREVENT VIDEO PREEZING.
  22.  
  23. -- This is the URL that checks if the videos are real
  24. -- DON'T change this unless you've uploaded the PHP file somewhere else.
  25. JukeBox.Settings.CheckerURL = "http://botdan.com/JukeBox/VideoLength/?id="
  26.  
  27. -- This is the URL that gets the search data for the Add a song - Search tab
  28. -- DON'T change this unless you've uploaded the PHP file somewhere else.
  29. JukeBox.Settings.SearchURL = "http://botdan.com/JukeBox/VideoSearch/?search="
  30.  
  31. -- This is the URL used to return all the videos in a playlist
  32. -- DON'T change this unless you've uploaded the PHP file somewhere else.
  33. JukeBox.Settings.PlaylistURL = "http://botdan.com/JukeBox/VideoPlaylist/?id="
  34.  
  35. -- The default volume for new users of the player
  36. -- This can be between 0 and 100 (0 = can't hear)
  37. JukeBox.Settings.DefaultVolume = 25
  38.  
  39. -- Time in seconds to add to the song length to allow for lag
  40. -- This will help people with slower connections hear the whole song.
  41. JukeBox.Settings.LagCompensationTime = 2
  42.  
  43. -- The maximum length of a song before it can't be added (in seconds)
  44. -- Set this number very high if you require no limit. (60*30 = 30 minutes)
  45. JukeBox.Settings.MaxSongLength = 60*30
  46.  
  47. --| TTT SETTINGS |----------------------------------------------------------------------------------------
  48. -- Whether songs should play while a player is alive
  49. -- Useful for gamemodes where voice chat is needed while alive.
  50. JukeBox.Settings.PlayWhileAlive = true
  51.  
  52. -- Whether songs should only play during the downtime in TTT
  53. -- This is in between the time of the round ending and the prep phase starting.
  54. -- /!\ JukeBox.Settings.PlayWhileAlive should be true for this to work! /!\
  55. JukeBox.Settings.TTTOnlyRoundEnd = false
  56.  
  57. -- Whether songs should play always unless it's the end of the round.
  58. -- This is the opposite of JukeBox.Settings.TTTOnlyRoundEnd
  59. -- /!\ JukeBox.Settings.PlayWhileAlive should be true for this to work! /!\
  60. JukeBox.Settings.TTTNotRoundEnd = false
  61.  
  62. --| QUEUING COST |----------------------------------------------------------------------------------------
  63. -- Whether to use Pointshop 1 Points to queue songs
  64. -- Set to true to enable or false to disable
  65. JukeBox.Settings.UsePointshop = false
  66.  
  67. -- Whether to use Pointshop 2 Points to queue songs
  68. -- Set to true to enable or false to disable
  69. JukeBox.Settings.UsePointshop2 = false
  70.  
  71. -- Whether to use SH Pointshop points
  72. -- Set to true to enable or false to disable
  73. JukeBox.Settings.UseSHPointshop = false
  74.  
  75. -- How much it costs to queue a song
  76. -- This only works if Pointshop 1 or 2 are set to true
  77. JukeBox.Settings.PointsCost = 50
  78.  
  79. -- Whether to use DarkRP cash to queue songs
  80. -- Make sure if set to true that UsePointshop is set to false
  81. JukeBox.Settings.UseDarkRPCash = false
  82.  
  83. -- How much it costs to queue a song
  84. -- This only works if the above is set to true
  85. JukeBox.Settings.DarkRPCashCost = 500
  86.  
  87. -- Whether to use Sandbox Simple Money System to queue a song
  88. -- Requires http://steamcommunity.com/sharedfiles/filedetails/?id=620306794
  89. -- Make sure to set the other 3 to false
  90. JukeBox.Settings.UseSimpleMoney = false
  91.  
  92. -- How much it costs to queue a song
  93. -- This only works if the above is set to true
  94. JukeBox.Settings.SimpleMoneyCost = 100
  95.  
  96. -- If certain ranks should get a discount
  97. -- This is the percentage of regular price they should pay, eg. 0.25 means 75% off
  98. -- Format: ["GROUPNAME"] = DECIMAL (0 to 1),
  99. JukeBox.Settings.RankDiscount = {
  100.     ["user"] = 1,
  101.     ["superadmin"] = 0.5
  102. }
  103.  
  104. --| PLAYER COOLDOWNS |------------------------------------------------------------------------------------
  105. -- Whether players should be limited to how many songs they queue
  106. -- Below you can change how many songs that can queue in a certain time
  107. JukeBox.Settings.UsePlayerCooldowns = false
  108.  
  109. -- The amount of time it takes for the queue limit to reset (in seconds)
  110. -- This is measures in seconds. (60*10 = 10 minutes)
  111. JukeBox.Settings.PlayerCooldownsTime = 60*5
  112. -- Override cooldowns time for certain groups.
  113. -- Format: ["GROUPNAME"] = TIME,
  114. JukeBox.Settings.PlayerCooldownsTimeList = {
  115.     ["superadmin"] = 60*5,
  116. }
  117.  
  118. -- How many songs a player can queue per the time above.
  119. -- By default, this allows users to request 2 songs every 10 minutes.
  120. JukeBox.Settings.PlayerCooldownsLimit = 3
  121. -- Override cooldowns limit for certain groups.
  122. -- Format: ["GROUPNAME"] = LIMIT,
  123. JukeBox.Settings.PlayerCooldownsLimitList = {
  124.     ["superadmin"] = 4,
  125. }
  126.  
  127. --| SONG COOLDOWNS |--------------------------------------------------------------------------------------
  128. -- Whether songs should be blocked from being queued after playing.
  129. -- This prevents the same songs playing over and over again.
  130. JukeBox.Settings.UseCooldowns = true
  131.  
  132. -- How long the song should be blocked for after playing.
  133. -- The time is done in seconds and is applied at the end of the song. (60*15 = 15mins)
  134. JukeBox.Settings.CooldownAmount = 60*15
  135.  
  136. -- A list of groups that can bypass the song cooldown limits.
  137. -- Don't edit this if you don't want any groups to bypass the cooldowns.
  138. JukeBox.Settings.CooldownBypassers = {
  139. --  "superadmin",
  140. }
  141.  
  142. --| ADD A SONG COOLDOWNS |--------------------------------------------------------------------------------
  143. -- Whether players should be limited to how many songs they can request to add
  144. -- Below you can change how many requests they can add in a certain time
  145. JukeBox.Settings.UseAddSongCooldowns = false
  146.  
  147. -- The amount of time it takes for the add a song limit to reset (in seconds)
  148. -- This is measures in seconds. (60*10 = 10 minutes)
  149. JukeBox.Settings.AddSongCooldownsTime = 60*30
  150. -- Override cooldowns time for certain groups.
  151. -- Format: ["GROUPNAME"] = TIME,
  152. JukeBox.Settings.AddSongCooldownsTimeList = {
  153.     ["superadmin"] = 60*5,
  154. }
  155.  
  156. -- How many songs a player can add per the time above.
  157. -- By default, this allows users to request to add 2 songs every 30 minutes.
  158. JukeBox.Settings.AddSongCooldownsLimit = 2
  159. -- Override cooldowns limit for certain groups.
  160. -- Format: ["GROUPNAME"] = LIMIT,
  161. JukeBox.Settings.AddSongCooldownsLimitList = {
  162.     ["superadmin"] = 4,
  163. }
  164.  
  165. -- Whether the Add a Song feature should be restricted from certain ranks.
  166. -- This can be used to restrict the Add a Song feature.
  167. JukeBox.Settings.UseAddSongGroupRestrictions = true
  168.  
  169. -- If the Group Restrictions should work as a whitelist.
  170. -- This means that anyone in the list below WILL be able to queue songs, everyone else won't be.
  171. JukeBox.Settings.AddSongGroupRestrctionWhiteList = true
  172.  
  173. -- The list of groups that CAN'T or CAN use the Add a Song.
  174. -- Restricts users from being able to queue songs.
  175. -- CURRENTLY NOT WORKING WITH SERVERGUARD RANKS
  176. JukeBox.Settings.AddSongRestrictedGroups = {
  177.     "superadmin",
  178.     "admin",
  179. }
  180.  
  181. --| RESTRICTIONS |----------------------------------------------------------------------------------------
  182. -- Whether the JukeBox should be restricted from certain ranks.
  183. -- This can be used to make the JukeBox donator only.
  184. JukeBox.Settings.UseGroupRestrictions = false
  185.  
  186. -- Whether groups that can't use the JukeBox should be able to use the menu
  187. -- This can be used to hide the UI from certain ranks
  188. JukeBox.Settings.RestrictMenu = false
  189.  
  190. -- If the Group Restrictions should work as a whitelist.
  191. -- This means that anyone in the list below WILL be able to queue songs, everyone else won't be.
  192. JukeBox.Settings.GroupRestrctionWhiteList = true
  193.  
  194. -- The list of groups that CAN'T or CAN use the JukeBox.
  195. -- Restricts users from being able to queue songs.
  196. -- CURRENTLY NOT WORKING WITH SERVERGUARD RANKS
  197. JukeBox.Settings.RestrictedGroups = {
  198.     "user",
  199.     "none",
  200. }
  201.  
  202. -- Same as UseGroupRestrictions, but will create an xAdmin permission
  203. -- Users will need to have this permission to use the JukeBox.
  204. JukeBox.Settings.UsexAdminRestrictions = false
  205.  
  206. -- If the JukeBox should only be managable by certain DarkRP Jobs.
  207. -- This can be used to make a DJ job.
  208. JukeBox.Settings.UseJobRestrictions = false
  209.  
  210. -- If the Job Restrictions should work as a whitelist.
  211. -- This means that anyone with a job in the list below WILL be able to queue songs, everyone else won't be.
  212. JukeBox.Settings.JobRestrictionWhitelist = false
  213.  
  214. -- The list of DarkRP jobs than CAN or CAN'T use the JukeBox.
  215. -- Restricts users from being able to queue songs.
  216. hook.Add( "DarkRPFinishedLoading", "JukeBox.Setings.DarkRPJobRestrictions", function()
  217.     JukeBox.Settings.RestrictedJobs = {
  218.         --TEAM_DJ,
  219.         --TEAM_HOBO
  220.     }
  221. end )
  222.  
  223. --| MISC |------------------------------------------------------------------------------------------------
  224. -- If requests should be automatically added to the All Songs list
  225. -- This means the Manager Requests tab will not be used.
  226. JukeBox.Settings.AutoAcceptRequests = false
  227.  
  228. -- This allows users to pay a bit extra to have their request added straight to the All Songs list
  229. -- This is good for servers that don't have a huge Manager population
  230. JukeBox.Settings.RequestFasttrack = false
  231.  
  232. -- How much it costs to skip the Manager approval system
  233. -- NOTE: This uses whatever currency system you have enabled up top (PS1, PS2 or DarkRP Cash)
  234. JukeBox.Settings.RequestFasttrackCost = 250
  235.  
  236. -- If queueing songs can only be done by managers (I RECOMMEND RESTRICTIONS INSTEAD ABOVE)
  237. -- This prevents users from queueing songs but they can still request
  238. JukeBox.Settings.ManagerOnlyMode = false
  239.  
  240. -- This disables the Listen Locally option if you want.
  241. -- This removed the menu when you click Queue and takes you straight to the popup.
  242. JukeBox.Settings.AllowLocalPlay = true
  243.  
  244. -- The percentage of players that have to vote skip a song for it to skip
  245. -- This is done as a decimal from 0 to 1 (0.6 = 60%)
  246. JukeBox.Settings.VoteSkipPercent = 0.45
  247.  
  248. -- This is how long the notifications at the top of the JukeBox stay around for in seconds
  249. -- Set this to 0 to disable the timer.
  250. JukeBox.Settings.NotificationTimer = 10
  251.  
  252. -- This can disable the Add Playlist tab
  253. -- Use this if you're worried your Manager's may abuse the feature
  254. JukeBox.Settings.DisableAddPlaylistTab = false
  255.  
  256. -- This can enable logging of most JukeBox events daily.
  257. -- Note that the log files may get quite big.
  258. -- DOESN'T DO ANYTHING CURRENTLY
  259. JukeBox.Settings.EnableLogging = false
  260.  
  261. --| QUICK KEY |-------------------------------------------------------------------------------------------
  262. -- Whether a key should be used to open the VGUI
  263. -- This key ideally should be a KEY_F followed by a number (KEY_F8 is F8)
  264. JukeBox.Settings.UseQuickKey = true
  265.  
  266. -- The key to open the menu with
  267. -- Key values can be found at http://wiki.garrysmod.com/page/Enums/KEY
  268. JukeBox.Settings.QuickKey = KEY_F9
  269.  
  270. --| IDLE PLAY |-------------------------------------------------------------------------------------------
  271. -- Should the JukeBox automatically play songs if none are queue'd?
  272. -- This sort of turns the JukeBox into a radio while no ongs are queue'd
  273. JukeBox.Settings.EnableIdlePlay = false
  274.  
  275. -- Whether, when a new song is queue'd, it should start it instantly
  276. -- This means it will cut off the current idle song and play the first in the queue
  277. JukeBox.Settings.IdlePlayCutoff = false
  278.  
  279. -- How long to wait before starting the idle play
  280. -- This stops the JukeBox from instantly playing idle songs
  281. JukeBox.Settings.IdlePlayDelay = 15
  282.  
  283. -- How long to wait in-between idle play songs
  284. -- Good if you want some time betweeen each song
  285. JukeBox.Settings.IdlePlaySpacing = 10
  286.  
  287. --| ULX RANKS + COMMANDS |--------------------------------------------------------------------------------------------
  288. -- If a/multiple ULX ranks should be used for manager rank on the JukeBox
  289. -- This allows them to add, edit and remove songs
  290. JukeBox.Settings.UseULXRanks = true
  291.  
  292. -- The ULX ranks to have access to the manager parts of the JukeBox
  293. -- Only used if the above setting is set to true
  294. JukeBox.Settings.ULXRanksList = {
  295.     "superadmin",
  296.     "admin",
  297. }
  298.  
  299. -- Should ServerGuard ranks be used for manager ranks on the JukeBox
  300. -- This allows them to add, edit and remove songs
  301. -- SET JukeBox.Settings.UseULXRanks TO FALSE IF USING THIS!
  302. JukeBox.Settings.UseServerGuardRanks = false
  303.  
  304. -- The ServerGuard ranks to have access to the manager parts of the JukeBox
  305. -- Only used if the above setting is set to true
  306. JukeBox.Settings.ServerGuardRanksList = {
  307.     "superadmin",
  308. }
  309.  
  310. -- SteamIDs that have access to the manager parts of the JukeBox
  311. JukeBox.Settings.SteamIDList = {
  312.     "STEAM_0:X:XXXXXX",
  313. }
  314.  
  315. -- A list of DarkRP jobs that will be managers of the JukeBox
  316. hook.Add( "DarkRPFinishedLoading", "JukeBox.Setings.DarkRPFix", function()
  317.     JukeBox.Settings.DarkRPJobRanks = {
  318.         --TEAM_GUN,
  319.         --TEAM_CITIZEN,
  320.         --TEAM_SUPERADMIN
  321.     }
  322. end )
  323.  
  324. -- Commands to open the JukeBox VGUI
  325. JukeBox.Settings.ChatCommands = {
  326.     "!jb",
  327.     "!jukebox",
  328.     "/jukebox",
  329.     "/jb",
  330.     "!radio",
  331.     "/radio",
  332.     "!music",
  333.     "/music"
  334. }
  335.  
  336. -- Commands to voteskip the current song
  337. JukeBox.Settings.SkipCommands = {
  338.     "!skipsong",
  339.     "/skipsong",
  340. }
  341.  
  342. -- Commands to stop the JukeBox
  343. JukeBox.Settings.StopCommand = {
  344.     "!stop",
  345.     "/stop",
  346. }
  347.  
  348. --| HUD SETTINGS |----------------------------------------------------------------------------------------
  349. -- Whether the HUD element should be displayed
  350. -- This displayes the currently playing song name and artist
  351. JukeBox.Settings.HUDEnabled = true
  352.  
  353. -- If the HUD element should be left, right or center
  354. -- "left", "right" or "center" only.
  355. JukeBox.Settings.HUDAcross = "left"
  356.  
  357. -- If the HUD element should be top, bottom or center
  358. -- "top", "bottom" or "center" only
  359. JukeBox.Settings.HUDDown = "bottom"
  360.  
  361. --[[ VGUI COLOURS ]]--
  362. -- I don't recommend changing any of these other than the Definition colour and the 2 chat colours.
  363. JukeBox.Colours.Base = Color( 50, 50, 50 )
  364. JukeBox.Colours.Background = Color( 35, 35, 35 )
  365. JukeBox.Colours.Definition = Color( 230, 126, 34 )
  366. JukeBox.Colours.Light = Color( 65, 65, 65, 255 )
  367.  
  368. JukeBox.Colours.Issue = Color( 231, 76, 60 )
  369. JukeBox.Colours.Accept = Color( 46, 204, 113 )
  370. JukeBox.Colours.Warning = Color( 241, 196, 15 )
  371. JukeBox.Colours.Information = Color( 52, 152, 219 )
  372.  
  373. JukeBox.Colours.ChatBase = Color( 255, 255, 255 )
  374. JukeBox.Colours.ChatHighlight = Color( 230, 126, 34 )
  375.  
  376. JukeBox.Colours.HUDBase = Color( 0, 0, 0, 200 )
  377. JukeBox.Colours.HUDHighlight = Color( 230, 126, 34, 200 )
  378. JukeBox.Colours.HUDFont = Color( 255, 255, 255, 220 )
  379.  
  380. --[[ FONTS ]]--
  381. if SERVER then return end
  382. for i=4, 50 do -- I'll change this :)
  383.     surface.CreateFont( "JukeBox.Font."..i, {
  384.         font = "Roboto",
  385.         size = i,
  386.         weight = 0,
  387.         antialias = true,
  388.     } )
  389.     surface.CreateFont( "JukeBox.Font."..i..".Bold", {
  390.         font = "Roboto Bold",
  391.         size = i,
  392.         weight = 1000,
  393.         antialias = true,
  394.     } )
  395. end
  396.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement