· 7 years ago · Nov 19, 2018, 11:04 PM
1elegant_printers.config = {
2--[[
3 These are the default values that will be used for each printer.
4]]
5
6--[[
7 DarkRP custom entity values
8
9 You can also use the other values! https://wiki.darkrp.com/index.php/DarkRP:CustomEntityFields
10 as well as whatever custom fields your addons make use of.
11]]
12-- example:
13-- customCheck = function(ply) end,
14-- This will get run just like if you added the "spawn" field in DarkRP.createEntity!
15
16 PrintName = "Default Money Printer",
17-- The name of the money printer that will be displayed in messages and the F4 menu
18
19 price = 1000,
20-- The price of a default printer.
21
22 max = 3,
23-- By default, you can have any number of printers you want at once. (math.huge = BASICALLY INFINITE)
24-- If you set this to a number, you will be limited in the amount of printers you can simultaneously own!
25
26 SeizeReward = 0,
27-- The amount of money a cop will receive upon seizing a printer. (When attacked with a Stun Stick)
28
29--[[
30 The printer entity's values
31]]
32 PrintAmount = 1000,
33-- The amount of money printed per "ink usage".
34
35 PrintTime = 60 * 3,
36-- The amount of time in seconds it takes to print money. ((60 * 3) seconds = 3 minutes)
37
38 HeatupTime = 10,
39-- The amount of time in seconds it takes the printer to heat up.
40-- Everytime the printer heats up, it will take one damage to durability. Once it reaches 0, it will explode!
41-- You can prevent this using High Quality Cooling.
42
43 MaxMoney = 10000,
44-- The maximum amount of money the money printer can store until it stops printing.
45-- TIP: You can pass math.huge as a value to make it infinite.
46
47 InkSystem = true,
48-- If set to false, the printers will work without ink.
49
50 CoolingSystem = true,
51-- If set to false, the simple cooling system will be disabled.
52
53 MaxInk = 5,
54-- The default amount of times a printer can print money before you have to refill it.
55
56 InkRefill = 5,
57-- The amount of ink that will be refilled on usage of an ink cartridge.
58-- TIP: This value is also used to determine how many slots will be added on usage of an ink cartridge slot upgrade!
59
60 UpgradedMaxInk = 15,
61-- The maximum amount of ink a printer can store, with all slot upgrades.
62
63 LogoURL = "https://image.ibb.co/mEGH0L/NextRP.png",
64-- An URL linking to the image that will get displayed on your printer's interface.
65-- Must be a direct link to the image, ending with .jpg or .png
66
67 GradientDirection = "right",
68-- The direction of the background gradient used on the printer.
69-- Possible values: "up", "down", "left", "right", "none"
70
71 Gradient1 = Color(66, 89, 255),
72-- Start color of the gradient (Pick RGB values using https://www.w3schools.com/colors/colors_picker.asp)
73-- If GradientDirection is set to "none", this will be the background of the printer's interface.
74
75 Gradient2 = Color(20, 184, 255),
76-- End color of the gradient
77-- Unused if GradientDirection is set to "none".
78
79 InvertColors = false,
80-- Do you want to switch white text for black text, on the printer interface?
81-- Could improve readability depending on the gradient colors you chose.
82
83 AllowedVIPs = {
84 -- "vip",
85 },
86-- If this table exists and is not empty, players that do not have one of the specified usergroups will not be able to buy a printer.
87
88--[[
89 If ItemStore is installed...
90
91 https://www.gmodstore.com/scripts/view/15/itemstore-inventory-for-darkrp
92]]
93 ItemStore = true,
94-- If set to true, this will let you pick up the printers and its upgrades with it.
95
96--[[
97 If Vrondrakis's Level System is installed...
98
99 https://github.com/vrondakis/Leveling-System
100]]
101 VrondakisLevelSystem = true,
102-- If set to true, printers will give XP on money retrieval.
103 VrondakisLevelSystem_Multiplier = 0.25,
104-- The XP being given is the amount of money being retrieved multiplied by the above number.
105 VrondakisLevelSystem_MinLevel = 0,
106-- The minimum level required to spawn a printer.
107
108--[[
109 Using the same variable names as the ones above with different values, you can create customized printer tiers.
110 The values you pick for them will override the ones of the default printer, set above this comment.
111 You can add any number of tiers you want.
112 Tier names will show up in some places, make sure to capitalize them properly!
113
114 Keep in mind, ALL of the above values have an effect! Don't be afraid to try and mix every config option with another!
115]]
116 Tiers = {
117 Tin = {
118 PrintName = "Tin Money Printer",
119 price = 7000,
120 cmd = "buyprinter_tin",
121
122 PrintAmount = 900,
123 Gradient1 = Color(230, 230, 230),
124 Gradient2 = Color(235, 235, 235),
125 PrintTime = 60
126 },
127 Copper = {
128 PrintName = "Copper Money Printer",
129 price = 12000,
130 cmd = "buyprinter_copper",
131
132 PrintAmount = 1000,
133 Gradient1 = Color(115, 81, 42),
134 Gradient2 = Color(115, 81, 42),
135 PrintTime = 75
136 },
137 Titanium = {
138 PrintName = "Titanium Money Printer",
139 price = 18000,
140 cmd = "buyprinter_titanium",
141
142 PrintAmount = 1200,
143 Gradient1 = Color(63, 63, 63),
144 Gradient2 = Color(63, 63, 63),
145 PrintTime = 75
146 },
147 Bronze = {
148 customCheck = function(ply) return CLIENT or
149 table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold", "silver", "bronze", "silver_headofstaff", "silver_headadmin", "silver_admin", "silver_smod", "silver_mod", "silver_trialmod", "bronze_headofstaff", "bronze_headadmin", "bronze_admin", "bronze_smod", "bronze_mod", "bronze_trialmod"}, ply:GetNWString("usergroup"))
150end,
151CustomCheckFailMsg = "This printer is BronzeVIP+ only!",
152 PrintName = "BronzeVIP Money Printer",
153 price = 25000,
154 cmd = "buyprinter_bronze",
155
156 PrintAmount = 2500,
157 Gradient1 = Color(66, 89, 255),
158 Gradient2 = Color(20, 184, 255),
159 PrintTime = 40
160 },
161 Silver = {
162 customCheck = function(ply) return CLIENT or
163 table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold", "silver", "silver_headofstaff", "silver_headadmin", "silver_admin", "silver_smod", "silver_mod", "silver_trialmod"}, ply:GetNWString("usergroup"))
164end,
165CustomCheckFailMsg = "This printer is SilverVIP+ only!",
166 PrintName = "SilverVIP Money Printer",
167 price = 20000,
168 cmd = "buyprinter_silver",
169
170 PrintAmount = 5500,
171 Gradient1 = Color(160, 160, 160),
172 Gradient2 = Color(150, 150, 150),
173 PrintTime = 35
174 },
175 Gold = {
176 customCheck = function(ply) return CLIENT or
177 table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold"}, ply:GetNWString("usergroup"))
178end,
179CustomCheckFailMsg = "This printer is GoldVIP+ only!",
180 PrintName = "GoldVIP Money Printer",
181 price = 19000,
182 cmd = "buyprinter_gold",
183
184 PrintAmount = 6500,
185 Gradient1 = Color(188, 166, 22),
186 Gradient2 = Color(245, 215, 24),
187 PrintTime = 30
188 },
189 Platinum = {
190 customCheck = function(ply) return CLIENT or
191 table.HasValue({"superadmin", "developer", "plat_headofstaff", "plat_headadmin", "plat_admin", "plat_smod, "plat_mod", "plat_trialmod", "platinum"}, ply:GetNWString("usergroup"))
192end,
193CustomCheckFailMsg = "This printer is PlatinumVIP only!",
194 PrintName = "PlatinumVIP Money Printer",
195 price = 18000,
196 cmd = "buyprinter_platinum",
197
198 PrintAmount = 8000,
199 InkSystem = false,
200 CoolingSystem = false,
201 InvertColors = true,
202 Gradient1 = Color(0, 0, 0),
203 Gradient2 = Color(255, 255, 255),
204 PrintTime = 25
205 },
206 },
207
208--[[
209 These tables allow you to customize each upgrade's price and model.
210 You shouldn't have to modify the latter at any point, but it's up to you if you want to.
211]]
212 InkCartridge = {
213 PrintName = "Money Printer Ink Cartridge",
214 price = 1000,
215 model = "models/freeman/compact_printer_ink.mdl",
216 cmd = "buyprinterink",
217
218 Disabled = false, -- If set to true, the item won't show up in the F4 menu.
219 },
220 InkSlot = {
221 PrintName = "Money Printer Ink Cartridge Slot",
222 price = 1000,
223 model = "models/Items/car_battery01.mdl",
224 cmd = "buyprinterslot",
225
226 Disabled = false, -- If set to true, the item won't show up in the F4 menu.
227 },
228 RepairPart = {
229 PrintName = "Money Printer Repair Part",
230 price = 5000,
231 model = "models/props_lab/reciever01d.mdl",
232 cmd = "buyprinterrepair",
233
234 Disabled = false, -- If set to true, the item won't show up in the F4 menu.
235 },
236 HQCooling = {
237 PrintName = "Money Printer High Quality Cooling",
238 price = 5000,
239 model = "models/props_phx/gears/spur12.mdl",
240 cmd = "buyprintercooling",
241
242 Disabled = false, -- If set to true, the item won't show up in the F4 menu.
243 },
244
245--[[
246 Printing bonus event, triggered with the `elegant_printers_triggerevent` command.
247 You can let superadmins run that command whenever they want, or make it part of a package of your favorite donation system!
248]]
249 EventDuration = 60 * 60 * 3,
250-- Duration in seconds ((60 * 60 * 3) seconds = 3 hours)
251
252 EventPrintMultiplier = 1.5,
253-- 1.5 equals to +50% print bonus!
254
255--[[
256 Usergroup overrides and bonuses
257]]
258 PrintMultiplierVIPs = { -- You can make it so certain usergroups benefit from a permanent print percentage bonus, the same way as the event print multiplier.
259 -- superadmin = 1.5,
260 },
261 UpgradedMaxInkVIPs = { -- Same goes with maximum ink cartridge slot upgrade limits!
262 superadmin = 20
263 },
264
265--[[
266 Miscellaneous values, used for printing in the chat as well as the console, and the F4 menu category.
267]]
268 CommunityName = "NextRP",
269 CommunityColor = Color(245, 245, 245),
270}
271
272--[[
273 Past this point, I strongly advise you not to modify or remove anything else in the addon; unless you know what you are doing.
274 I have made it so the addition of the printers and their upgrades to the F4 menu are completely automated, entirely through
275 the use of the above config table. If you ended up breaking this file, just start over and try again!
276
277 Make sure to restart everytime you make a change to be sure everything has been applied properly.
278 ALSO, DON'T FORGET ANY COMMAS.
279
280 If you have encountered any bug, and are absolutely certain that it is not your fault, please create a support ticket.
281]]