DarkNessProvides

SScoreboard config

Nov 15th, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.72 KB | None | 0 0
  1. /*
  2. ╔╗──╔═══╦═══╦╗╔═╦═══╦═══╗  ╔══╦╗──╔╗  ╔═══╦═══╦═══╦════╗╔╗─╔╦═══╦═══╗
  3. ║║──║╔══╣╔═╗║║║╔╣╔══╩╗╔╗║  ║╔╗║╚╗╔╝║  ║╔═╗║╔═╗║╔═╗╠══╗═╠╝║╔╝║╔═╗║╔══╝
  4. ║║──║╚══╣║─║║╚╝╝║╚══╗║║║║  ║╚╝╚╗╚╝╔╝  ║║─╚╣║─║║╚═╝║─╔╝╔╩╗║╚╗╠╝╔╝║╚══╗
  5. ║║─╔╣╔══╣╚═╝║╔╗║║╔══╝║║║║  ║╔═╗╠╗╔╝─  ║║─╔╣╚═╝║╔╗╔╝╔╝╔╝─║║─║║─║╔╩══╗║
  6. ║╚═╝║╚══╣╔═╗║║║╚╣╚══╦╝╚╝║  ║╚═╝║║║──  ║╚═╝║╔═╗║║║╚╦╝═╚═╦╝╚╦╝╚╗║║╔══╝║
  7. ╚═══╩═══╩╝─╚╩╝╚═╩═══╩═══╝  ╚═══╝╚╝──  ╚═══╩╝─╚╩╝╚═╩════╩══╩══╝╚╝╚═══╝
  8. */
  9.  
  10. SConfig                 = {}    --Don't change the name of this!
  11.  
  12. SConfig.Website         = "http://unknownrp.hol.es/" --The link to your website
  13.  
  14. SConfig.Bars            = true  --Enable coloured bars on the player row in the scoreboard
  15. SConfig.BarsColorRank   = false --Set to false to make the bar's colour that of a player's job...
  16.                                 --...true to make them rank based (see rank table below)
  17.  
  18. SConfig.RowFade         = 4     --The speed of which to fade in when the player's mouse hovers over a row
  19. SConfig.RowAlphaMin     = 0     --The minimum alpha value of a player row (the background colour of the player's team)
  20. SConfig.RowAlphaMax     = 150   --The maximum alpha value of a player row
  21.  
  22. SConfig.Rank            = true  --Set to false to disable the rank column
  23.  
  24. SConfig.Ranks           = {}    --The table for the scoreboard's ranks
  25.                                 --Used for displaying nice names and colours depending on a player's usergroup
  26. --Example usage:
  27. --SConfig.Ranks["groupname"] =  {"Nice Name",   Color("255, 255, 255")}
  28. SConfig.Ranks["superadmin"] =   {"SuperAdmin",  Color(184, 55, 255)}
  29. SConfig.Ranks["admin"]      =   {"Admin",       Color(229, 105, 37)}
  30. SConfig.Ranks["operator"]   =   {"Op",          Color(96, 143, 191)}
  31. SConfig.Ranks["guest"]      =   {"Guest",       Color(232, 144, 44)}
  32. SConfig.Ranks["user"]       =   {"User",        Color(255, 255, 255)}
  33. SConfig.Ranks["moderator"]  =   {"Moderator",   Color(96, 143, 191)}
  34. SConfig.Ranks["developer"]  =   {"Developer",   Color(112, 95, 255)}
  35.  
  36.  
  37. SConfig.Columns             =   {}  --The table for holding the columns you want
  38.  
  39. --The header for the column is the part inside the first set of brackets, this goes above all of the values
  40. --The first value inside the curly braces is how far along the scoreboard you want the column to be, 0.5 being halfway
  41. --The second value is the colour of the text in the column
  42. --The third is a function which returns what you want to be shown in the player row (ask your developer about this if you're unsure)
  43.  
  44. --Example usage:
  45. --SConfig.Columns["Level"]  =   {0.35,  Color(255,255,255,200), function(ply) return ply:GetLevel() end}
  46. SConfig.Columns["Rank"]     =   {0.5,   Color(255,255,255,200), function(ply) return ply:GetUserGroup() end}
  47. SConfig.Columns["Team"]     =   {0.65,  Color(255,255,255,200), function(ply) return team.GetName(ply:Team()) end}
  48. SConfig.Columns["Karma"]    =   {0.65,  Color(255,255,255,200), function(ply) return math.Round(ply:GetBaseKarma()) end}
  49. SConfig.Columns["Score"]    =   {0.75,  Color(255,255,255,200), function(ply) return ply:Frags() end}
  50. SConfig.Columns["Deaths"]   =   {0.825, Color(255,255,255,200), function(ply) return ply:Deaths() end}
  51. SConfig.Columns["Ping"]     =   {0.9,   Color(255,255,255,200), function(ply) return ply:Ping() end}
  52.  
  53. SConfig.Criteria            = "Score" --The default column to sort by, should be one of the table values above(eg: "Team, "Rank")
  54.  
  55. --Below are all the fonts that can be edited to your liking if you wish to do so.
  56. surface.CreateFont("SScoreText", {font = "Open Sans", size = 22, weight = 0}) --General font used for player rows and headers
  57. surface.CreateFont("SSCoreButtons", {font = "Open Sans", size = 28, weight = 0}) --Font used on button panel's buttons
  58. surface.CreateFont("SScoreLabel", {font = "Open Sans", size = 20, weight = 0}) --Font used for information panel's labels
  59. surface.CreateFont("SScoreTime", {font = "Open Sans", size = 74, weight = 0}) --Font used to display clock
  60. surface.CreateFont("SScoreInfo", {font = "Open Sans", size = 48, weight = 0}) --Large font used for information
  61. surface.CreateFont("SScoreSubInfo", {font = "Open Sans", size = 36, weight = 0}) --Font used to display gamemode and players
Advertisement
Add Comment
Please, Sign In to add comment