Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.73 KB | None | 0 0
  1. TitleStore.Config = TitleStore.Config or {}
  2. -- If you run into any issues and the addon throws errors at you, contact me through a support ticket, or add me on steam.
  3. --[[
  4. ====================================================
  5. This first section is for the core side of the addon
  6. ====================================================
  7. ]]
  8.  
  9.  
  10. -- Databases
  11.  
  12. -- Use MySQL over sqloo?
  13. TitleStore.Config.UseMySQL = false
  14. -- If using mysql please go to config/sv_mysql.lua and enter your details.
  15. -- Entities are never saved through MySQL as it seems very unnecessary.
  16.  
  17. -- Due to demand, we have built in basewars support, if you'd like support for any other gamemodes throw us a ticket.
  18. TitleStore.Config.Basewars = false
  19.  
  20. -- This is the command you will use to transfer data from MySQL to SQL and vice versa.
  21. -- Only use this command if you have data stored in SQL and want it to be transfered over to mysql or vice versa.
  22. -- This command is restricted strictly to superadmins.
  23. -- If you do not have your MySQL details set in sv_mysql.lua nothing will happen.
  24. TitleStore.Config.TransferSQLCommand = "titlestoretransfer"
  25. -- This command will transfer data from whatever you are using to the other method of storing data, so if you're currently on a server using mysql, the command will transfer the sql data and save it using mysql.
  26. -- It will also overwrite any current data, so it's reccomended you only use it when transfering
  27.  
  28.  
  29.  
  30. -- Look and feel
  31.  
  32. -- The font used throughout the addon
  33. TitleStore.Config.Font = "Calibri"
  34.  
  35. -- Notification color
  36. TitleStore.Config.PrefixColor = Color(255, 255, 0)
  37.  
  38. -- Chat prefix
  39. TitleStore.Config.Prefix = "[Title Store]"
  40.  
  41. -- Whether the NPC displays text normally above it instead of using it's own custom title, this is most useful when making the titlestore NPC a model without a head.
  42. TitleStore.Config.NormalText = false
  43.  
  44. -- NPC's Custom Title Data
  45. TitleStore.Config.NPCFont = "Arial" -- Only Valid Title Fonts
  46. TitleStore.Config.NPCColor = Color(250, 250, 250)
  47. TitleStore.Config.NPCSpin = false
  48. TitleStore.Config.NPCRainbow = true
  49. TitleStore.Config.NPCAnimation = "Random" -- Could be "Random" or if you want a specific animation, you would replace Random with that, for example TitleStore.Config.NPCAnimation = "Orbit"
  50. -- /NPC's Custom Title Data
  51.  
  52. -- The NPC text
  53. TitleStore.Config.NPCText = "Title Store"
  54.  
  55. -- NPC model
  56. TitleStore.Config.NPCModel = "models/Humans/Group01/male_07.mdl"
  57.  
  58. -- Disable titles command
  59. TitleStore.Config.ToggleTitles = "toggletitles"
  60.  
  61. -- Command to choose title from bought titles.
  62. TitleStore.Config.TitleMenu = "titles" -- (always lowercase)
  63.  
  64. -- Animation height, this is how high the animations show above the players head.
  65. TitleStore.Config.Height = 10
  66.  
  67. -- This is the height of the animation shows above models that may not have a head bone, for example models/Zombie/Classic_legs.mdl
  68. TitleStore.Config.NoHeadHeight = 1
  69.  
  70.  
  71.  
  72.  
  73. -- Administrator Access
  74.  
  75. -- The chat command to open the admin menu through which players can have titles added, removed or refunded at full price.
  76. TitleStore.Config.AdminMenu = "titlesadmin"
  77.  
  78.  
  79. -- The ulx ranks that have access to the admin menu and admin functions.
  80. TitleStore.Config.AdminMenuRanks = {
  81. ["superadmin"] = true
  82. }
  83.  
  84. -- Will titlestore report people who try to cheat in illegal titles with clientside lua?
  85. TitleStore.Config.StaffWarnings = true
  86.  
  87. -- The ranks that can see the staff warnings.
  88. TitleStore.Config.SeeStaffWarning = function(ply) return ULib.ucl.query(ply, seeasayAccess) end -- Uses ulib to see if the player has the ulx permission 'asay' which is the same as the ulx admin chat.
  89.  
  90. TitleStore.Config.SaveNPCsCommand = "titlestoresave"
  91.  
  92.  
  93. -- Buyables
  94.  
  95. -- Should the buy menu have a 'titles' button in the right top corner for people who don't know to do !titles?
  96. TitleStore.Config.TitlesButton = true
  97.  
  98. -- How should titles and animations be sorted in the buy menu. 'price' or 'alpha'. If neither of these are chosen then it will default to random.
  99. TitleStore.Config.TitleAnimSort = "price"
  100.  
  101. -- Should the custom title be displayed at the top of the titles list, if false it will remain at the bottom of the titles list.
  102. TitleStore.Config.CustomTitleTop = true
  103.  
  104. -- Should custom titles up for purchase?
  105. TitleStore.Config.CustomTags = true
  106.  
  107. -- If above is true, the price for a custom title.
  108. TitleStore.Config.CustomPrice = 10000000
  109.  
  110. -- What should the character limit be for custom titles?
  111. TitleStore.Config.CustomLimit = 25
  112.  
  113. -- How much should an added spin animation cost?
  114. TitleStore.Config.SpinPrice = 25000
  115.  
  116. -- Who's allowed to use spin?
  117. TitleStore.Config.SpinCustomCheck = function(ply) return true end -- Let anyone use spin
  118.  
  119. -- How much should rainbow colors cost?
  120. TitleStore.Config.RainbowPrice = 750000
  121.  
  122. -- Who's allowed to use rainbow?
  123. TitleStore.Config.RainbowCustomCheck = function(ply) return true end -- Let anyone use rainbow
  124.  
  125. -- How much of the original price should the player get from a refund, 0.75 = 75% of original price
  126. TitleStore.Config.RefundPercentage = 0.75
  127.  
  128.  
  129. --[[
  130.  
  131. This is how you insert your own titles into the script or remove some of ours,
  132.  
  133. Titles will be set out as such (without custom check):
  134.  
  135. ["Title Name"] = {
  136. price = 10000
  137. },
  138.  
  139.  
  140. And with custom check:
  141.  
  142. ["Title Name"] = {
  143. price = 10000,
  144. customCheck = function(ply) return 'check' end
  145. },
  146.  
  147.  
  148. The custom checks are like DarkRP custom checks.
  149. You can use https://csite.io/tools/gmod-darkrp-customcheck however visibility has to be restricted to those who can pass the check and you should ignore the 'CustomCheckFailMsg = "",' when copying it over.
  150.  
  151. Animations and fonts follow the same structure.
  152. ]]
  153.  
  154. TitleStore.Config.Titles = {
  155. ["Unloved"] = {
  156. price = 50000
  157. },
  158. ["Wannabe Owner"] = {
  159. price = 75000
  160. },
  161. ["Gangster"] = {
  162. price = 100000
  163. },
  164. ["The Boss"] = {
  165. price = 200000
  166. },
  167. ["Legend"] = {
  168. price = 250000
  169. },
  170. ["Aids"] = {
  171. price = 300000
  172. },
  173. ["Script Kiddie"] = {
  174. price = 400000
  175. },
  176. ["PropPushing Pro"] = {
  177. price = 500000
  178. },
  179. ["Owners Slave"] = {
  180. price = 600000
  181. },
  182. ["Pimp"] = {
  183. price = 700000
  184. },
  185. ["SniperGang"] = {
  186. price = 750000
  187. },
  188. ["Blood"] = {
  189. price = 800000
  190. },
  191. ["Crip"] = {
  192. price = 900000
  193. },
  194. ["Slumdog Millionaire"] = {
  195. price = 1000000
  196. },
  197. ["Owners Slave"] = {
  198. price = 2000000
  199. },
  200. ["Pro Coder"] = {
  201. price = 2500000
  202. },
  203. ["God"] = {
  204. price = 5000000
  205. },
  206. ["Big Ol' Doinks"] = {
  207. price = 7500000
  208. },
  209. ["Dog Cunt"] = {
  210. price = 7500000
  211. },
  212. ["Donator"] = {
  213. price = 100000,
  214. customCheck = function(ply) return ply:GetUserGroup() == "superadmin", "manager", "headadministrator", "admin", "dgmoderator", "vmoderator", "dmoderator", "dgtrialmoderator", "vtrialmoderator", "dtrialmoderator", "doogler", "vip", "donator" end
  215. },
  216. ["VIP"] = {
  217. price = 100000,
  218. customCheck = function(ply) return ply:GetUserGroup() == "superadmin", "manager", "headadministrator", "admin", "dgmoderator", "vmoderator", "dgtrialmoderator", "vtrialmoderator", "doogler", "vip" end
  219. },
  220. ["Doogler"] = {
  221. price = 100000,
  222. customCheck = function(ply) return ply:GetUserGroup() == "superadmin", "manager", "headadministrator", "admin", "dgmoderator", "dgtrialmoderator", "doogler" end
  223. }
  224. }
  225.  
  226.  
  227.  
  228. -- Animations, adding new animations requires a good knowledge of both Lua and math. It's suggested
  229. -- to leave the animations as is. However, if you want to add more animations, you will need to add
  230. -- them to both this file and the "sh_animations.lua" file. Make sure they both have the same name and key.
  231. -- If you don't edit the animations, KEEP THE NAMES AS IS!! If you want to change the names, open a support ticket.
  232. -- However, you can change the price/customCheck here just fine.
  233. TitleStore.Config.Animations = {
  234. ["None"] = {
  235. price = 0
  236. },
  237. ["Bouncing"] = {
  238. price = 250000
  239. },
  240. ["Wave"] = {
  241. price = 250000
  242. },
  243. ["Wiggle"] = {
  244. price = 250000
  245. },
  246. ["TypeWriter"] = {
  247. price = 250000
  248. },
  249. ["Rotate Left-Right"] = {
  250. price = 250000
  251. },
  252. ["Glitch"] = {
  253. price = 250000
  254. },
  255. ["Halo"] = {
  256. price = 500000,
  257. customCheck = function(ply) return table.HasValue({"superadmin", "manager", "headadministrator", "admin", "dgmoderator", "vmoderator", "dmoderator", "dgtrialmoderator", "vtrialmoderator", "dtrialmoderator", "doogler", "vip", "donator"}, ply:GetUserGroup()) end
  258. },
  259. ["Orbit"] = {
  260. price = 5000000,
  261. customCheck = function(ply) return table.HasValue({"superadmin", "manager", "headadministrator", "admin", "dgmoderator", "vmoderator", "dmoderator", "dgtrialmoderator", "vtrialmoderator", "dtrialmoderator", "doogler", "vip", "donator"}, ply:GetUserGroup()) end
  262. },
  263. ["Pulsing"] = {
  264. price = 500000
  265. }
  266. }
  267.  
  268.  
  269.  
  270. -- Fonts
  271. -- They have to be a font you have added or that are already in base garrysmod.
  272. TitleStore.Config.DefaultTitleFont = "Arial" -- This will be the initial free font.
  273.  
  274. TitleStore.Config.Fonts = {
  275. ["Verdana Bold"] = {
  276. price = 0
  277. },
  278. ["Verdana"] = {
  279. price = 0
  280. -- customCheck = function(ply) return table.HasValue({"Owner"}, ply:GetUserGroup()) end
  281. },
  282. ["HL2cross"] = {
  283. price = 0
  284. },
  285. ["Courier New"] = {
  286. price = 0
  287. },
  288. ["Tahoma"] = {
  289. price = 0
  290. }
  291. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement